Skip to content

Commit

Permalink
Send and require SENDADDRV2 before VERACK
Browse files Browse the repository at this point in the history
See the corresponding BIP change: bitcoin/bips#1043
  • Loading branch information
sipa authored and furszy committed Aug 10, 2021
1 parent 61c2ed4 commit ba954ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/net_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,6 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
PushNodeVersion(pfrom, connman, GetAdjustedTime());

CNetMsgMaker msg_maker(INIT_PROTO_VERSION);
connman->PushMessage(pfrom, msg_maker.Make(NetMsgType::VERACK));

if (nVersion >= 70923) {
// BIP155 defines addrv2 and sendaddrv2 for all protocol versions, but some
Expand All @@ -1159,6 +1158,8 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
connman->PushMessage(pfrom, msg_maker.Make(NetMsgType::SENDADDRV2));
}

connman->PushMessage(pfrom, msg_maker.Make(NetMsgType::VERACK));

pfrom->nServices = nServices;
pfrom->SetAddrLocal(addrMe);
{
Expand Down

0 comments on commit ba954ca

Please sign in to comment.