MCPcopy Create free account
hub / github.com/ElementsProject/elements / send_addr_msg

Method send_addr_msg

test/functional/p2p_addr_relay.py:113–122  ·  view source on GitHub ↗
(self, source, msg, receivers)

Source from the content-addressed store, hash-verified

111 return msg
112
113 def send_addr_msg(self, source, msg, receivers):
114 source.send_and_ping(msg)
115 # invoke m_next_addr_send timer:
116 # `addr` messages are sent on an exponential distribution with mean interval of 30s.
117 # Setting the mocktime 600s forward gives a probability of (1 - e^-(600/30)) that
118 # the event will occur (i.e. this fails once in ~500 million repeats).
119 self.mocktime += 10 * 60
120 self.nodes[0].setmocktime(self.mocktime)
121 for peer in receivers:
122 peer.sync_send_with_ping()
123
124 def oversized_addr_test(self):
125 self.log.info('Send an addr message that is too large')

Callers 3

relay_testsMethod · 0.95
blocksonly_mode_testsMethod · 0.95

Calls 3

setmocktimeMethod · 0.80
sync_send_with_pingMethod · 0.80
send_and_pingMethod · 0.45

Tested by

no test coverage detected