Skip to content

Commit ba954ca

Browse files
sipafurszy
authored andcommitted
Send and require SENDADDRV2 before VERACK
See the corresponding BIP change: bitcoin/bips#1043
1 parent 61c2ed4 commit ba954ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1148,7 +1148,6 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
11481148
PushNodeVersion(pfrom, connman, GetAdjustedTime());
11491149

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

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

1161+
connman->PushMessage(pfrom, msg_maker.Make(NetMsgType::VERACK));
1162+
11621163
pfrom->nServices = nServices;
11631164
pfrom->SetAddrLocal(addrMe);
11641165
{

0 commit comments

Comments
 (0)