Skip to content

Commit 02ee4eb

Browse files
committed
Make most_recent_compact_block a pointer to a const
1 parent 73666ad commit 02ee4eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,11 @@ void PeerLogicValidation::SyncTransaction(const CTransaction& tx, const CBlockIn
754754

755755
static CCriticalSection cs_most_recent_block;
756756
static std::shared_ptr<const CBlock> most_recent_block;
757-
static std::shared_ptr<CBlockHeaderAndShortTxIDs> most_recent_compact_block;
757+
static std::shared_ptr<const CBlockHeaderAndShortTxIDs> most_recent_compact_block;
758758
static uint256 most_recent_block_hash;
759759

760760
void PeerLogicValidation::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock) {
761-
std::shared_ptr<CBlockHeaderAndShortTxIDs> pcmpctblock = std::make_shared<CBlockHeaderAndShortTxIDs> (*pblock, true);
761+
std::shared_ptr<const CBlockHeaderAndShortTxIDs> pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs> (*pblock, true);
762762
CNetMsgMaker msgMaker(PROTOCOL_VERSION);
763763

764764
LOCK(cs_main);

0 commit comments

Comments
 (0)