Skip to content

Commit cd73721

Browse files
committed
Merge #16737: test: Establish only one connection between nodes in rpc_invalidateblock
fae961d test: Establish only one connection between nodes in rpc_invalidateblock (MarcoFalke) Pull request description: Headers and block sync should eventually converge to the same result, regardless of whether the peers treat each other as "inbound" or "outbound". `connect_nodes_bi` has been introduced as a (temporary?) workaround for bug #5113 and #5138, which has long been fixed in #5157 and #5662. Thus remove the `connect_nodes_bi` workaround from the rpc_invalidateblock test. Conveniently, this also closes #16453. See bitcoin/bitcoin#16444 (comment) for rationale ACKs for top commit: laanwj: ACK fae961d Tree-SHA512: b3614c66a205823df73f64d19cacfbec269beb5db52ff79004d746e17d7c0dfb43ab9785fdddc97e2a76fe76286c8c605b34df3dda4a2bf5be035f01169ae89a
2 parents eb81225 + fae961d commit cd73721

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/rpc_invalidateblock.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from test_framework.address import ADDRESS_BCRT1_UNSPENDABLE
99
from test_framework.util import (
1010
assert_equal,
11-
connect_nodes_bi,
11+
connect_nodes,
1212
wait_until,
1313
)
1414

@@ -33,7 +33,7 @@ def run_test(self):
3333
assert_equal(self.nodes[1].getblockcount(), 6)
3434

3535
self.log.info("Connect nodes to force a reorg")
36-
connect_nodes_bi(self.nodes, 0, 1)
36+
connect_nodes(self.nodes[0], 1)
3737
self.sync_blocks(self.nodes[0:2])
3838
assert_equal(self.nodes[0].getblockcount(), 6)
3939
badhash = self.nodes[1].getblockhash(2)
@@ -44,7 +44,7 @@ def run_test(self):
4444
assert_equal(self.nodes[0].getbestblockhash(), besthash_n0)
4545

4646
self.log.info("Make sure we won't reorg to a lower work chain:")
47-
connect_nodes_bi(self.nodes, 1, 2)
47+
connect_nodes(self.nodes[1], 2)
4848
self.log.info("Sync node 2 to node 1 so both have 6 blocks")
4949
self.sync_blocks(self.nodes[1:3])
5050
assert_equal(self.nodes[2].getblockcount(), 6)

0 commit comments

Comments
 (0)