test: Print reject reason if RPC test block rejected instead of accepted

This commit is contained in:
Jack Grigg 2021-08-13 16:38:04 +01:00
parent d477208a28
commit 1e352c108c
1 changed files with 2 additions and 0 deletions

View File

@ -289,6 +289,8 @@ class TestManager(object):
print('Block rejected with %s instead of expected %s: %064x' % (c.cb.block_reject_map[blockhash], outcome, blockhash))
return False
elif ((c.cb.bestblockhash == blockhash) != outcome):
if outcome is True and blockhash in c.cb.block_reject_map:
print('Block rejected with %s instead of accepted: %064x' % (c.cb.block_reject_map[blockhash], blockhash))
return False
return True