|
|
@ -529,12 +529,11 @@ void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pf |
|
|
|
if (lNodesAnnouncingHeaderAndIDs.size() >= 3) { |
|
|
|
if (lNodesAnnouncingHeaderAndIDs.size() >= 3) { |
|
|
|
// As per BIP152, we only get 3 of our peers to announce
|
|
|
|
// As per BIP152, we only get 3 of our peers to announce
|
|
|
|
// blocks using compact encodings.
|
|
|
|
// blocks using compact encodings.
|
|
|
|
bool found = connman.ForNode(lNodesAnnouncingHeaderAndIDs.front(), [&connman, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion](CNode* pnodeStop){ |
|
|
|
connman.ForNode(lNodesAnnouncingHeaderAndIDs.front(), [&connman, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion](CNode* pnodeStop){ |
|
|
|
connman.PushMessage(pnodeStop, NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); |
|
|
|
connman.PushMessage(pnodeStop, NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
}); |
|
|
|
}); |
|
|
|
if(found) |
|
|
|
lNodesAnnouncingHeaderAndIDs.pop_front(); |
|
|
|
lNodesAnnouncingHeaderAndIDs.pop_front(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
fAnnounceUsingCMPCTBLOCK = true; |
|
|
|
fAnnounceUsingCMPCTBLOCK = true; |
|
|
|
connman.PushMessage(pfrom, NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); |
|
|
|
connman.PushMessage(pfrom, NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); |
|
|
|