Skip to content

Commit e6867a3

Browse files
committed
merge bitcoin#25123: Fix race condition in index prune test
1 parent baf6e26 commit e6867a3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/functional/feature_index_prune.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
assert_equal,
99
assert_greater_than,
1010
assert_raises_rpc_error,
11-
p2p_port,
1211
)
1312
from test_framework.governance import EXPECTED_STDERR_NO_GOV_PRUNE
1413

@@ -134,11 +133,11 @@ def run_test(self):
134133
self.nodes[i].assert_start_raises_init_error(extra_args=self.extra_args[i], expected_msg=f"{EXPECTED_STDERR_NO_GOV_PRUNE}\n{msg}")
135134

136135
self.log.info("make sure the nodes start again with the indices and an additional -reindex arg")
137-
ip_port = "127.0.0.1:" + str(p2p_port(3))
138136
for i in range(3):
139-
# The nodes need to be reconnected to the non-pruning node upon restart, otherwise they will be stuck
140-
restart_args = self.extra_args[i]+["-reindex", f"-connect={ip_port}"]
137+
restart_args = self.extra_args[i]+["-reindex"]
141138
self.restart_node(i, extra_args=restart_args, expected_stderr=EXPECTED_STDERR_NO_GOV_PRUNE)
139+
# The nodes need to be reconnected to the non-pruning node upon restart, otherwise they will be stuck
140+
self.connect_nodes(i, 3)
142141

143142
self.sync_blocks(timeout=300)
144143

0 commit comments

Comments
 (0)