From 1e352c108c0d2921c34854d2bbb21aa8af88f04d Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 13 Aug 2021 16:38:04 +0100 Subject: [PATCH] test: Print reject reason if RPC test block rejected instead of accepted --- qa/rpc-tests/test_framework/comptool.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qa/rpc-tests/test_framework/comptool.py b/qa/rpc-tests/test_framework/comptool.py index 0eb72921c..02d09fa20 100755 --- a/qa/rpc-tests/test_framework/comptool.py +++ b/qa/rpc-tests/test_framework/comptool.py @@ -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