Skip to content

Commit

Permalink
Allow sendaddrv2 before verack
Browse files Browse the repository at this point in the history
  • Loading branch information
zquestz committed Dec 21, 2024
1 parent 2f3d743 commit 80f6be1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions peer/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2180,6 +2180,16 @@ func (p *Peer) readRemoteVerAckMsg() error {
return err
}

// We might see a sendaddrv2 message here, that is OKAY based on
// the spec!
_, ok := remoteMsg.(*wire.MsgSendAddrV2)
if ok {
remoteMsg, _, err = p.readMessage(wire.LatestEncoding)
if err != nil {
return err
}
}

// It should be a verack message, otherwise send a reject message to the
// peer explaining why.
msg, ok := remoteMsg.(*wire.MsgVerAck)
Expand Down

0 comments on commit 80f6be1

Please sign in to comment.