Skip to content

Commit faecb72

Browse files
author
MarcoFalke
committed
test: Fix intermittent issue in p2p_segwit.py
1 parent a7a1937 commit faecb72

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/functional/p2p_segwit.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,9 +1966,10 @@ def test_upgrade_after_activation(self):
19661966
# Restarting node 2 should result in a shutdown because the blockchain consists of
19671967
# insufficiently validated blocks per segwit consensus rules.
19681968
self.stop_node(2)
1969-
with self.nodes[2].assert_debug_log(expected_msgs=[
1970-
f"Witness data for blocks after height {SEGWIT_HEIGHT} requires validation. Please restart with -reindex."], timeout=10):
1971-
self.nodes[2].start([f"-segwitheight={SEGWIT_HEIGHT}"])
1969+
self.nodes[2].assert_start_raises_init_error(
1970+
extra_args=[f"-segwitheight={SEGWIT_HEIGHT}"],
1971+
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.",
1972+
)
19721973

19731974
# As directed, the user restarts the node with -reindex
19741975
self.start_node(2, extra_args=["-reindex", f"-segwitheight={SEGWIT_HEIGHT}"])

0 commit comments

Comments
 (0)