You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, we would prepare to self-announce to a new peer while
parsing a VERSION message from that peer. This is useless,
because we do something very similar in AdvertiseLocal(),
although there are a couple differences:
1) AdvertiseLocal() does this for all peers, not just outbound
2) AdvertiseLocal() always asks the peer to advertise based on what
they think we are AND what we think we are (assuming it's routable),
while PushAddress(self) on VERSION always does one of the two.
(1) and the fact that AdvertiseLocal() is called right before
actually sending out ADDR message with our address makes it fully
encompassing PushAddress(self) on VERSION.
Per (2), AdvertiseLocal() seems like a better version of
PushAddress(self) on VERSION.
Thus, it's fine to drop PushAddress(self) on VERSION.
0 commit comments