mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
[net_processing] Defer initializing m_addr_known
Use SetupAddressRelay to only initialize `m_addr_known` as needed. For outbound peers, we initialize the filter before sending our self announcement (not applicable for block-relay-only connections). For inbound peers, we initialize the filter when we get an addr related message (ADDR, ADDRV2, GETADDR). These changes intend to mitigate address blackholes. Since an inbound peer has to send us an addr related message to become eligible as a candidate for addr relay, this should reduce our likelihood of sending them self-announcements.
This commit is contained in:
parent
6653fa3328
commit
1d1ef2db7e
3 changed files with 22 additions and 11 deletions
|
|
@ -438,6 +438,7 @@ class P2PInterface(P2PConnection):
|
|||
self.send_message(msg_sendaddrv2())
|
||||
self.send_message(msg_verack())
|
||||
self.nServices = message.nServices
|
||||
self.send_message(msg_getaddr())
|
||||
|
||||
# Connection helper methods
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue