aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-23 16:12:55 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-11-23 16:14:21 -0800
commit407d9232ef5cb1ebf6cff21f3d13e07ea4158eeb (patch)
treeacba2988b1f07a0d7adf30c20545f6f0c43dea77 /src/main.cpp
parent0de7fd36de57a68e543b4c1f184fba192c398c73 (diff)
parentca8549d2bd32f17f8b69d1edbe3f2976fba504b4 (diff)
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.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 723f9c2421..b49b545a31 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);