Consider faucet amount in verify balance
This commit is contained in:
parent
c852f41d76
commit
1e87f2ed31
@ -254,6 +254,10 @@ class Verifier:
|
|||||||
if len(k) > 7 and k[:7] == 'verify_':
|
if len(k) > 7 and k[:7] == 'verify_':
|
||||||
logg.debug('verifier has verify method {}'.format(k))
|
logg.debug('verifier has verify method {}'.format(k))
|
||||||
verifymethods.append(k[7:])
|
verifymethods.append(k[7:])
|
||||||
|
o = self.faucet_tx_factory.token_amount(self.faucet_address, sender_address=ZERO_ADDRESS)
|
||||||
|
r = self.conn.do(o)
|
||||||
|
self.faucet_amount = self.faucet_tx_factory.parse_token_amount(r)
|
||||||
|
logg.info('faucet amount set to {} at verify initialization time'.format(self.faucet_amount))
|
||||||
|
|
||||||
self.state = VerifierState(verifymethods, active_tests=active_tests)
|
self.state = VerifierState(verifymethods, active_tests=active_tests)
|
||||||
|
|
||||||
@ -284,6 +288,7 @@ class Verifier:
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
actual_balance = int(r)
|
actual_balance = int(r)
|
||||||
balance = int(balance / 1000000) * 1000000
|
balance = int(balance / 1000000) * 1000000
|
||||||
|
balance += self.faucet_amount
|
||||||
logg.debug('balance for {}: {}'.format(address, balance))
|
logg.debug('balance for {}: {}'.format(address, balance))
|
||||||
if balance != actual_balance:
|
if balance != actual_balance:
|
||||||
raise VerifierError((actual_balance, balance), 'balance')
|
raise VerifierError((actual_balance, balance), 'balance')
|
||||||
|
Loading…
Reference in New Issue
Block a user