functional_tests: fix rare get_output_distribution failure

When the wallet auto refreshes after mining the last two blocks
but before popping them, it will then try to use outputs which
are not unlocked yet. This is really a wallet problem, which
will be fixed later.
pull/202/head
moneromooo-monero 5 years ago committed by wowario
parent 502f96011e
commit ae876c7532
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -213,5 +213,14 @@ class GetOutputDistributionTest():
assert d.distribution[h] == 0
class Guard:
def __enter__(self):
for i in range(4):
Wallet(idx = i).auto_refresh(False)
def __exit__(self, exc_type, exc_value, traceback):
for i in range(4):
Wallet(idx = i).auto_refresh(True)
if __name__ == '__main__':
GetOutputDistributionTest().run_test()
with Guard() as guard:
GetOutputDistributionTest().run_test()

Loading…
Cancel
Save