Truly wait for pow in test_send_broadcast() in test_api

This commit is contained in:
Lee Miller 2023-12-31 17:13:58 +02:00
parent 696f9f9aeb
commit 348df1151f
Signed by untrusted user: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -369,7 +369,7 @@ class TestAPI(TestAPIProto):
'doingbroadcastpow', 'broadcastqueued', 'broadcastsent')) 'doingbroadcastpow', 'broadcastqueued', 'broadcastsent'))
start = time.time() start = time.time()
while status == 'doingbroadcastpow': while status != 'broadcastsent':
spent = int(time.time() - start) spent = int(time.time() - start)
if spent > 30: if spent > 30:
self.fail('PoW is taking too much time: %ss' % spent) self.fail('PoW is taking too much time: %ss' % spent)