File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,16 @@ def getaddr_tests(self):
299299 assert_equal (block_relay_peer .num_ipv4_received , 0 )
300300 assert inbound_peer .num_ipv4_received > 100
301301
302+ self .log .info ('Check that we answer getaddr messages only once per connection' )
303+ received_addrs_before = inbound_peer .num_ipv4_received
304+ with self .nodes [0 ].assert_debug_log (['Ignoring repeated "getaddr".' ]):
305+ inbound_peer .send_and_ping (msg_getaddr ())
306+ self .mocktime += 10 * 60
307+ self .nodes [0 ].setmocktime (self .mocktime )
308+ inbound_peer .sync_with_ping ()
309+ received_addrs_after = inbound_peer .num_ipv4_received
310+ assert_equal (received_addrs_before , received_addrs_after )
311+
302312 self .nodes [0 ].disconnect_p2ps ()
303313
304314 def blocksonly_mode_tests (self ):
You can’t perform that action at this time.
0 commit comments