diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-04-28 10:06:54 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-04-29 13:02:33 +0200 |
commit | faecb72c3ca744f1adb77bd910c643cedec3b445 (patch) | |
tree | e209b901d5afcb0287c070620de592cebaa82180 /test/functional | |
parent | a7a193789eea669d207a8ba8e447c4458b2814fe (diff) | |
download | bitcoin-faecb72c3ca744f1adb77bd910c643cedec3b445.tar.xz |
test: Fix intermittent issue in p2p_segwit.py
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/p2p_segwit.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py index 1b6e122ee4..9d32c1cb86 100755 --- a/test/functional/p2p_segwit.py +++ b/test/functional/p2p_segwit.py @@ -1966,9 +1966,10 @@ class SegWitTest(BitcoinTestFramework): # Restarting node 2 should result in a shutdown because the blockchain consists of # insufficiently validated blocks per segwit consensus rules. self.stop_node(2) - with self.nodes[2].assert_debug_log(expected_msgs=[ - f"Witness data for blocks after height {SEGWIT_HEIGHT} requires validation. Please restart with -reindex."], timeout=10): - self.nodes[2].start([f"-segwitheight={SEGWIT_HEIGHT}"]) + self.nodes[2].assert_start_raises_init_error( + extra_args=[f"-segwitheight={SEGWIT_HEIGHT}"], + expected_msg=f": Witness data for blocks after height {SEGWIT_HEIGHT} requires validation. Please restart with -reindex..\nPlease restart with -reindex or -reindex-chainstate to recover.", + ) # As directed, the user restarts the node with -reindex self.start_node(2, extra_args=["-reindex", f"-segwitheight={SEGWIT_HEIGHT}"]) |