mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
Merge #18890: test: disconnect_nodes should warn if nodes were already disconnected
34e641a564
test: Remove unnecessary disconnect_nodes call in rpc_psbt.py (Danny Lee)e6e7abd51a
test: remove redundant two-way disconnect_nodes calls (Danny Lee)a9bd1f9adf
test: warn if nodes not connected before disconnect_nodes (Danny Lee) Pull request description: There's no harm in calling `disconnect_nodes` for nodes that weren't connected (in this case it's a no-op). However, detecting this case and logging a warning can help ensure that tests are behaving as expected. In addition, since `disconnect_nodes` works bidirectionally, I removed all instances of this pattern: ``` disconnect_nodes(self.nodes[0], 1) disconnect_nodes(self.nodes[1], 0) ``` ACKs for top commit: MarcoFalke: review ACK34e641a564
👔 amitiuttarwar: ACK34e641a564
. Thanks for this test improvement! Tree-SHA512: 344855ceb46c012d43c13d7c09f44d32dcb7645706d10ae1e4645d9edca54c6c6c13fee26b79480755cdfcdf39b4b5770b36bb03ce71ba002d5be8a27fe008af
This commit is contained in:
@@ -531,7 +531,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
Split the network of four nodes into nodes 0/1 and 2/3.
|
||||
"""
|
||||
disconnect_nodes(self.nodes[1], 2)
|
||||
disconnect_nodes(self.nodes[2], 1)
|
||||
self.sync_all(self.nodes[:2])
|
||||
self.sync_all(self.nodes[2:])
|
||||
|
||||
|
Reference in New Issue
Block a user