@@ -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
@@ -960,7 +960,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
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,7 +1153,7 @@ 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
}
@@ -1346,7 +1346,7 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
1346
1346
}
1347
1347
1348
1348
// At this point, the outgoing message serialization version can't change.
1349
- CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
1349
+ const CNetMsgMaker msgMaker (pfrom->GetSendVersion ());
1350
1350
1351
1351
if (strCommand == NetMsgType::VERACK)
1352
1352
{
@@ -2721,7 +2721,7 @@ bool SendMessages(CNode* pto, CConnman& connman, std::atomic<bool>& interruptMsg
2721
2721
return true ;
2722
2722
2723
2723
// If we get here, the outgoing message serialization version is set and can't change.
2724
- CNetMsgMaker msgMaker (pto->GetSendVersion ());
2724
+ const CNetMsgMaker msgMaker (pto->GetSendVersion ());
2725
2725
2726
2726
//
2727
2727
// Message: ping
0 commit comments