@@ -2745,12 +2745,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
2745
2745
return ;
2746
2746
}
2747
2747
2748
- // Feature negotiation of wtxidrelay must happen between VERSION and VERACK
2749
- // to avoid relay problems from switching after a connection is up.
2748
+ // BIP339 defines feature negotiation of wtxidrelay, which must happen between
2749
+ // VERSION and VERACK to avoid relay problems from switching after a connection is up.
2750
2750
if (msg_type == NetMsgType::WTXIDRELAY) {
2751
2751
if (pfrom.fSuccessfullyConnected ) {
2752
- // Disconnect peers that send wtxidrelay message after VERACK; this
2753
- // must be negotiated between VERSION and VERACK.
2752
+ // Disconnect peers that send a wtxidrelay message after VERACK.
2754
2753
LogPrint (BCLog::NET, " wtxidrelay received after verack from peer=%d; disconnecting\n " , pfrom.GetId ());
2755
2754
pfrom.fDisconnect = true ;
2756
2755
return ;
@@ -2769,10 +2768,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
2769
2768
return ;
2770
2769
}
2771
2770
2771
+ // BIP155 defines feature negotiation of addrv2 and sendaddrv2, which must happen
2772
+ // between VERSION and VERACK.
2772
2773
if (msg_type == NetMsgType::SENDADDRV2) {
2773
2774
if (pfrom.fSuccessfullyConnected ) {
2774
- // Disconnect peers that send SENDADDRV2 message after VERACK; this
2775
- // must be negotiated between VERSION and VERACK.
2775
+ // Disconnect peers that send a SENDADDRV2 message after VERACK.
2776
2776
LogPrint (BCLog::NET, " sendaddrv2 received after verack from peer=%d; disconnecting\n " , pfrom.GetId ());
2777
2777
pfrom.fDisconnect = true ;
2778
2778
return ;
0 commit comments