@@ -42,8 +42,8 @@ def set_test_params(self):
42
42
self .extra_args = [["-checkaddrman=1" ]] # Do addrman checks on all operations.
43
43
44
44
def fill_addrman (self , node_id ):
45
- """Add 1 tried address to the addrman, followed by 1 new address ."""
46
- for addr , tried in [[0 , True ], [1 , False ]]:
45
+ """Add 2 tried addresses to the addrman, followed by 2 new addresses ."""
46
+ for addr , tried in [[0 , True ], [1 , True ], [ 2 , False ], [ 3 , False ]]:
47
47
self .nodes [node_id ].addpeeraddress (address = f"101.{ addr } .0.0" , tried = tried , port = 8333 )
48
48
49
49
def test_without_asmap_arg (self ):
@@ -84,12 +84,12 @@ def test_asmap_interaction_with_addrman_containing_entries(self):
84
84
self .log .info ("Test bitcoind -asmap restart with addrman containing new and tried entries" )
85
85
self .stop_node (0 )
86
86
shutil .copyfile (self .asmap_raw , self .default_asmap )
87
- self .start_node (0 , ["-asmap" , "-checkaddrman=1" ])
87
+ self .start_node (0 , ["-asmap" , "-checkaddrman=1" , "-test=addrman" ])
88
88
self .fill_addrman (node_id = 0 )
89
- self .restart_node (0 , ["-asmap" , "-checkaddrman=1" ])
89
+ self .restart_node (0 , ["-asmap" , "-checkaddrman=1" , "-test=addrman" ])
90
90
with self .node .assert_debug_log (
91
91
expected_msgs = [
92
- "CheckAddrman: new 1 , tried 1 , total 2 started" ,
92
+ "CheckAddrman: new 2 , tried 2 , total 4 started" ,
93
93
"CheckAddrman: completed" ,
94
94
]
95
95
):
@@ -114,7 +114,7 @@ def test_empty_asmap(self):
114
114
def test_asmap_health_check (self ):
115
115
self .log .info ('Test bitcoind -asmap logs ASMap Health Check with basic stats' )
116
116
shutil .copyfile (self .asmap_raw , self .default_asmap )
117
- msg = "ASMap Health Check: 2 clearnet peers are mapped to 1 ASNs with 0 peers being unmapped"
117
+ msg = "ASMap Health Check: 4 clearnet peers are mapped to 3 ASNs with 0 peers being unmapped"
118
118
with self .node .assert_debug_log (expected_msgs = [msg ]):
119
119
self .start_node (0 , extra_args = ['-asmap' ])
120
120
os .remove (self .default_asmap )
0 commit comments