@@ -778,7 +778,7 @@ static uint256 most_recent_block_hash;
778
778
779
779
void PeerLogicValidation::NewPoWValidBlock (const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock) {
780
780
std::shared_ptr<const CBlockHeaderAndShortTxIDs> pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs> (*pblock, true );
781
- CNetMsgMaker msgMaker (PROTOCOL_VERSION);
781
+ const CNetMsgMaker msgMaker (PROTOCOL_VERSION);
782
782
783
783
LOCK (cs_main);
784
784
@@ -956,11 +956,11 @@ static void RelayAddress(const CAddress& addr, bool fReachable, CConnman& connma
956
956
connman.ForEachNodeThen (std::move (sortfunc), std::move (pushfunc));
957
957
}
958
958
959
- void static ProcessGetData (CNode* pfrom, const Consensus::Params& consensusParams, CConnman& connman, std::atomic<bool >& interruptMsgProc)
959
+ void static ProcessGetData (CNode* pfrom, const Consensus::Params& consensusParams, CConnman& connman, const std::atomic<bool >& interruptMsgProc)
960
960
{
961
961
std::deque<CInv>::iterator it = pfrom->vRecvGetData .begin ();
962
962
std::vector<CInv> vNotFound;
963
- CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
963
+ const CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
964
964
LOCK (cs_main);
965
965
966
966
while (it != pfrom->vRecvGetData .end ()) {
@@ -1153,12 +1153,12 @@ inline void static SendBlockTransactions(const CBlock& block, const BlockTransac
1153
1153
resp.txn [i] = block.vtx [req.indexes [i]];
1154
1154
}
1155
1155
LOCK (cs_main);
1156
- CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
1156
+ const CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
1157
1157
int nSendFlags = State (pfrom->GetId ())->fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS;
1158
1158
connman.PushMessage (pfrom, msgMaker.Make (nSendFlags, NetMsgType::BLOCKTXN, resp));
1159
1159
}
1160
1160
1161
- bool static ProcessMessage (CNode* pfrom, std::string strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CConnman& connman, std::atomic<bool >& interruptMsgProc)
1161
+ bool static ProcessMessage (CNode* pfrom, const std::string& strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CConnman& connman, const std::atomic<bool >& interruptMsgProc)
1162
1162
{
1163
1163
LogPrint (" net" , " received: %s (%u bytes) peer=%d\n " , SanitizeString (strCommand), vRecv.size (), pfrom->id );
1164
1164
if (IsArgSet (" -dropmessagestest" ) && GetRand (GetArg (" -dropmessagestest" , 0 )) == 0 )
@@ -1354,7 +1354,7 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
1354
1354
}
1355
1355
1356
1356
// At this point, the outgoing message serialization version can't change.
1357
- CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
1357
+ const CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
1358
1358
1359
1359
if (strCommand == NetMsgType::VERACK)
1360
1360
{
@@ -2588,7 +2588,7 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
2588
2588
return true ;
2589
2589
}
2590
2590
2591
- bool ProcessMessages (CNode* pfrom, CConnman& connman, std::atomic<bool >& interruptMsgProc)
2591
+ bool ProcessMessages (CNode* pfrom, CConnman& connman, const std::atomic<bool >& interruptMsgProc)
2592
2592
{
2593
2593
const CChainParams& chainparams = Params ();
2594
2594
//
@@ -2721,7 +2721,7 @@ class CompareInvMempoolOrder
2721
2721
}
2722
2722
};
2723
2723
2724
- bool SendMessages (CNode* pto, CConnman& connman, std::atomic<bool >& interruptMsgProc)
2724
+ bool SendMessages (CNode* pto, CConnman& connman, const std::atomic<bool >& interruptMsgProc)
2725
2725
{
2726
2726
const Consensus::Params& consensusParams = Params ().GetConsensus ();
2727
2727
{
@@ -2730,7 +2730,7 @@ bool SendMessages(CNode* pto, CConnman& connman, std::atomic<bool>& interruptMsg
2730
2730
return true ;
2731
2731
2732
2732
// If we get here, the outgoing message serialization version is set and can't change.
2733
- CNetMsgMaker msgMaker (pto->GetSendVersion ());
2733
+ const CNetMsgMaker msgMaker (pto->GetSendVersion ());
2734
2734
2735
2735
//
2736
2736
// Message: ping
0 commit comments