aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/util.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-04-19 08:47:56 -0400
committerMarcoFalke <falke.marco@gmail.com>2020-04-19 08:40:20 -0400
commitfac2fc4dd8a28b99e17c57e4ab6580a3231f1d0a (patch)
tree7b462f43dcc89499e2725e4555ea1df358d8277f /test/functional/test_framework/util.py
parentb470c758470fd97ccb42d0348a32942afa2a3ec8 (diff)
downloadbitcoin-fac2fc4dd8a28b99e17c57e4ab6580a3231f1d0a.tar.xz
test: Increase debugging to hunt down mempool_reorg intermittent failure
Diffstat (limited to 'test/functional/test_framework/util.py')
-rw-r--r--test/functional/test_framework/util.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index 9d5ff63f34..64e1aa3bbc 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -410,7 +410,10 @@ def sync_blocks(rpc_connections, *, wait=1, timeout=60):
# Check that each peer has at least one connection
assert (all([len(x.getpeerinfo()) for x in rpc_connections]))
time.sleep(wait)
- raise AssertionError("Block sync timed out:{}".format("".join("\n {!r}".format(b) for b in best_hash)))
+ raise AssertionError("Block sync timed out after {}s:{}".format(
+ timeout,
+ "".join("\n {!r}".format(b) for b in best_hash),
+ ))
def sync_mempools(rpc_connections, *, wait=1, timeout=60, flush_scheduler=True):
@@ -429,11 +432,16 @@ def sync_mempools(rpc_connections, *, wait=1, timeout=60, flush_scheduler=True):
# Check that each peer has at least one connection
assert (all([len(x.getpeerinfo()) for x in rpc_connections]))
time.sleep(wait)
- raise AssertionError("Mempool sync timed out:{}".format("".join("\n {!r}".format(m) for m in pool)))
+ raise AssertionError("Mempool sync timed out after {}s:{}".format(
+ timeout,
+ "".join("\n {!r}".format(m) for m in pool),
+ ))
+
# Transaction/Block functions
#############################
+
def find_output(node, txid, amount, *, blockhash=None):
"""
Return index to output of txid with value amount