@@ -458,7 +458,7 @@ class PeerManagerImpl final : public PeerManager
458
458
* lNodesAnnouncingHeaderAndIDs, and keeping that list under a certain size by
459
459
* removing the first element if necessary.
460
460
*/
461
- void MaybeSetPeerAsAnnouncingHeaderAndIDs (NodeId nodeid, CConnman& connman ) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
461
+ void MaybeSetPeerAsAnnouncingHeaderAndIDs (NodeId nodeid) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
462
462
463
463
/* * Stack of nodes which we have set to announce using compact blocks */
464
464
std::list<NodeId> lNodesAnnouncingHeaderAndIDs GUARDED_BY (cs_main);
@@ -739,7 +739,7 @@ static void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) EXCLUSIV
739
739
}
740
740
}
741
741
742
- void PeerManagerImpl::MaybeSetPeerAsAnnouncingHeaderAndIDs (NodeId nodeid, CConnman& connman ) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
742
+ void PeerManagerImpl::MaybeSetPeerAsAnnouncingHeaderAndIDs (NodeId nodeid) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
743
743
{
744
744
AssertLockHeld (cs_main);
745
745
CNodeState* nodestate = State (nodeid);
@@ -755,21 +755,21 @@ void PeerManagerImpl::MaybeSetPeerAsAnnouncingHeaderAndIDs(NodeId nodeid, CConnm
755
755
return ;
756
756
}
757
757
}
758
- connman .ForNode (nodeid, [this , &connman ](CNode* pfrom) EXCLUSIVE_LOCKS_REQUIRED (::cs_main) {
758
+ m_connman .ForNode (nodeid, [this ](CNode* pfrom) EXCLUSIVE_LOCKS_REQUIRED (::cs_main) {
759
759
AssertLockHeld (::cs_main);
760
760
uint64_t nCMPCTBLOCKVersion = (pfrom->GetLocalServices () & NODE_WITNESS) ? 2 : 1 ;
761
761
if (lNodesAnnouncingHeaderAndIDs.size () >= 3 ) {
762
762
// As per BIP152, we only get 3 of our peers to announce
763
763
// blocks using compact encodings.
764
- connman .ForNode (lNodesAnnouncingHeaderAndIDs.front (), [&connman , nCMPCTBLOCKVersion](CNode* pnodeStop){
765
- connman .PushMessage (pnodeStop, CNetMsgMaker (pnodeStop->GetCommonVersion ()).Make (NetMsgType::SENDCMPCT, /* fAnnounceUsingCMPCTBLOCK=*/ false , nCMPCTBLOCKVersion));
764
+ m_connman .ForNode (lNodesAnnouncingHeaderAndIDs.front (), [this , nCMPCTBLOCKVersion](CNode* pnodeStop){
765
+ m_connman .PushMessage (pnodeStop, CNetMsgMaker (pnodeStop->GetCommonVersion ()).Make (NetMsgType::SENDCMPCT, /* fAnnounceUsingCMPCTBLOCK=*/ false , nCMPCTBLOCKVersion));
766
766
// save BIP152 bandwidth state: we select peer to be low-bandwidth
767
767
pnodeStop->m_bip152_highbandwidth_to = false ;
768
768
return true ;
769
769
});
770
770
lNodesAnnouncingHeaderAndIDs.pop_front ();
771
771
}
772
- connman .PushMessage (pfrom, CNetMsgMaker (pfrom->GetCommonVersion ()).Make (NetMsgType::SENDCMPCT, /* fAnnounceUsingCMPCTBLOCK=*/ true , nCMPCTBLOCKVersion));
772
+ m_connman .PushMessage (pfrom, CNetMsgMaker (pfrom->GetCommonVersion ()).Make (NetMsgType::SENDCMPCT, /* fAnnounceUsingCMPCTBLOCK=*/ true , nCMPCTBLOCKVersion));
773
773
// save BIP152 bandwidth state: we select peer to be high-bandwidth
774
774
pfrom->m_bip152_highbandwidth_to = true ;
775
775
lNodesAnnouncingHeaderAndIDs.push_back (pfrom->GetId ());
@@ -1578,7 +1578,7 @@ void PeerManagerImpl::BlockChecked(const CBlock& block, const BlockValidationSta
1578
1578
!::ChainstateActive ().IsInitialBlockDownload () &&
1579
1579
mapBlocksInFlight.count (hash) == mapBlocksInFlight.size ()) {
1580
1580
if (it != mapBlockSource.end ()) {
1581
- MaybeSetPeerAsAnnouncingHeaderAndIDs (it->second .first , m_connman );
1581
+ MaybeSetPeerAsAnnouncingHeaderAndIDs (it->second .first );
1582
1582
}
1583
1583
}
1584
1584
if (it != mapBlockSource.end ())
0 commit comments