This picks up the last commit from #19843.
Previously, we would prepare to self-announce to a new peer while parsing a version message from that peer.
This is redundant, because we do something very similar in MaybeSendAddr(), which is called from SendMessages() after
the version handshake is finished.
There are a couple of differences:
MaybeSendAddr()self-advertises to all peers we do address relay with, not just outbound ones.GetLocalAddrForPeer()called fromMaybeSendAddr()makes a probabilistic decision to either advertise what they think we are or what we think we are, whilePushAddress()onversiondeterministically only does the former if the address from the latter is unroutable.- During
versionprocessing, we haven't received a potential sendaddrv2 message from our peer yet, so self-advertisements with addresses from addrV2-only networks would always be dropped inPushAddress().
Since it's confusing to have two slightly different mechanisms for self-advertising, and the one in MaybeSendAddr() is better, remove the one in version.