From 80f6be1357dd1c9df553d80e87d9e7df9bfd26db Mon Sep 17 00:00:00 2001 From: quest Date: Fri, 20 Dec 2024 18:11:58 -1000 Subject: [PATCH] Allow sendaddrv2 before verack --- peer/peer.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/peer/peer.go b/peer/peer.go index 713ad0dd..e5601a92 100644 --- a/peer/peer.go +++ b/peer/peer.go @@ -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)