In src/net_processing.cpp line 2131 to 2143
if (pfrom->nVersion >= SHORT_IDS_BLOCKS_VERSION) {
bool fAnnounceUsingCMPCTBLOCK = false;
uint64_t nCMPCTBLOCKVersion = 2;
if (pfrom->GetLocalServices() & NODE_WITNESS)
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion));
nCMPCTBLOCKVersion = 1;
connman->PushMessage(pfrom, msgMaker.Make(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion));
}
Can anyone explain why the node sends one more SENDCMPCT msg with nCMPCTBLOCKVersion = 1 when pfrom->GetLocalServices() & NODE_WITNESS is true?