diff options
| author | Pieter Wuille <[email protected]> | 2016-11-23 16:12:55 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-11-23 16:14:21 -0800 |
| commit | 407d9232ef5cb1ebf6cff21f3d13e07ea4158eeb (patch) | |
| tree | acba2988b1f07a0d7adf30c20545f6f0c43dea77 /src/main.cpp | |
| parent | Merge #9139: Change sync_blocks to pick smarter maxheight (on top of #9196) (diff) | |
| parent | Always drop the least preferred HB peer when adding a new one. (diff) | |
| download | discoin-407d9232ef5cb1ebf6cff21f3d13e07ea4158eeb.tar.xz discoin-407d9232ef5cb1ebf6cff21f3d13e07ea4158eeb.zip | |
Merge #9199: Always drop the least preferred HB peer when adding a new one.
ca8549d Always drop the least preferred HB peer when adding a new one. (Gregory Maxwell)
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 723f9c242..b49b545a3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -529,12 +529,11 @@ void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pf if (lNodesAnnouncingHeaderAndIDs.size() >= 3) { // As per BIP152, we only get 3 of our peers to announce // 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); return true; }); - if(found) - lNodesAnnouncingHeaderAndIDs.pop_front(); + lNodesAnnouncingHeaderAndIDs.pop_front(); } fAnnounceUsingCMPCTBLOCK = true; connman.PushMessage(pfrom, NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion); |