Dev Docs: Correct Connection Establishment Message Order

Text said: version/verack/version/verack.  Correct order (per code and
my own testing) is version/version/verack/verack.
This commit is contained in:
David A. Harding 2014-11-24 10:02:21 -05:00
parent ba153fc937
commit ecd5a349aa
No known key found for this signature in database
GPG key ID: 4B29C30FF29EC4B7

View file

@ -119,7 +119,11 @@ BitcoinJ is generated using the [makeseeds script][].
{% autocrossref %} {% autocrossref %}
Connecting to a peer is done by sending a `version` message, which contains your version number, block, and current time to the remote node. Once the message is received by the remote node, it must respond with a `verack` message, which may be followed by its own `version` message if the node desires to peer. Connecting to a peer is done by sending a `version` message, which
contains your version number, block, and current time to the remote
node. The remote node responds with its own `version` message. Then both
nodes send a `verack` message to the other node to indicate the
connection has been established.
Once connected, the client can send to the remote node `getaddr` and `addr` messages to gather additional peers. Once connected, the client can send to the remote node `getaddr` and `addr` messages to gather additional peers.