Skip to content

Commit

Permalink
BIP155: change when sendaddrv2 is to be sent
Browse files Browse the repository at this point in the history
Mandate to send `sendaddrv2` to the peer before sending our `verack`
to them.

This way we know that the peer does not support `addrv2` if we did not
receive `sendaddrv2` from them before receiving their `verack`.
  • Loading branch information
vasild committed Dec 8, 2020
1 parent 7e3284d commit e549ed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bip-0155.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ See the appendices for the address encodings to be used for the various networks

Introduce a new message type <code>sendaddrv2</code>. Sending such a message indicates that a node can understand and prefers to receive <code>addrv2</code> messages instead of <code>addr</code> messages. I.e. "Send me addrv2".

<code>sendaddrv2</code> SHOULD be sent after receiving the <code>verack</code> message from the peer.
The <code>sendaddrv2</code> message MUST only be sent in response to the <code>version</code> message from a peer and prior to sending the <code>verack</code> message.

For older peers, that did not emit <code>sendaddrv2</code>, keep sending the legacy <code>addr</code> message, ignoring addresses with the newly introduced address types.

Expand Down

0 comments on commit e549ed3

Please sign in to comment.