aboutsummaryrefslogtreecommitdiff
path: root/src/net_processing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r--src/net_processing.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 6374cb52c1..a7b4452967 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -2151,7 +2151,7 @@ void PeerManagerImpl::BlockDisconnected(const std::shared_ptr<const CBlock> &blo
*/
void PeerManagerImpl::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock)
{
- auto pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs>(*pblock);
+ auto pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs>(*pblock, GetRand<uint64_t>());
LOCK(cs_main);
@@ -2549,7 +2549,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
if (a_recent_compact_block && a_recent_compact_block->header.GetHash() == pindex->GetBlockHash()) {
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, *a_recent_compact_block);
} else {
- CBlockHeaderAndShortTxIDs cmpctblock{*pblock};
+ CBlockHeaderAndShortTxIDs cmpctblock{*pblock, GetRand<uint64_t>()};
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, cmpctblock);
}
} else {
@@ -6033,7 +6033,7 @@ bool PeerManagerImpl::SendMessages(CNode* pto)
CBlock block;
const bool ret{m_chainman.m_blockman.ReadBlockFromDisk(block, *pBestIndex)};
assert(ret);
- CBlockHeaderAndShortTxIDs cmpctblock{block};
+ CBlockHeaderAndShortTxIDs cmpctblock{block, GetRand<uint64_t>()};
MakeAndPushMessage(*pto, NetMsgType::CMPCTBLOCK, cmpctblock);
}
state.pindexBestHeaderSent = pBestIndex;