@@ -42,8 +42,8 @@ def set_test_params(self):
4242 self .extra_args = [["-checkaddrman=1" ]] # Do addrman checks on all operations.
4343
4444 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 ]]:
4747 self .nodes [node_id ].addpeeraddress (address = f"101.{ addr } .0.0" , tried = tried , port = 8333 )
4848
4949 def test_without_asmap_arg (self ):
@@ -84,12 +84,12 @@ def test_asmap_interaction_with_addrman_containing_entries(self):
8484 self .log .info ("Test bitcoind -asmap restart with addrman containing new and tried entries" )
8585 self .stop_node (0 )
8686 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" ])
8888 self .fill_addrman (node_id = 0 )
89- self .restart_node (0 , ["-asmap" , "-checkaddrman=1" ])
89+ self .restart_node (0 , ["-asmap" , "-checkaddrman=1" , "-test=addrman" ])
9090 with self .node .assert_debug_log (
9191 expected_msgs = [
92- "CheckAddrman: new 1 , tried 1 , total 2 started" ,
92+ "CheckAddrman: new 2 , tried 2 , total 4 started" ,
9393 "CheckAddrman: completed" ,
9494 ]
9595 ):
@@ -114,7 +114,7 @@ def test_empty_asmap(self):
114114 def test_asmap_health_check (self ):
115115 self .log .info ('Test bitcoind -asmap logs ASMap Health Check with basic stats' )
116116 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"
118118 with self .node .assert_debug_log (expected_msgs = [msg ]):
119119 self .start_node (0 , extra_args = ['-asmap' ])
120120 os .remove (self .default_asmap )
0 commit comments