mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-10 19:43:13 +02:00
test: fix intermittent failures with test=addrman
The nKey of the addrman is generated the first time the node is started. Therefore, restarting a node or turning it off and on again won't make a previously non-deterministic addrman deterministic. Co-authored-by: 0xb10c <b10c@b10c.me>
This commit is contained in:
@@ -319,7 +319,9 @@ class NetTest(BitcoinTestFramework):
|
||||
|
||||
def test_addpeeraddress(self):
|
||||
self.log.info("Test addpeeraddress")
|
||||
self.restart_node(1, ["-checkaddrman=1", "-test=addrman"])
|
||||
# The node has an existing, non-deterministic addrman from a previous test.
|
||||
# Clear it to have a deterministic addrman.
|
||||
self.restart_node(1, ["-checkaddrman=1", "-test=addrman"], clear_addrman=True)
|
||||
node = self.nodes[1]
|
||||
|
||||
self.log.debug("Test that addpeerinfo is a hidden RPC")
|
||||
|
Reference in New Issue
Block a user