mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-14 10:51:27 +02:00
net_processing: use existing RNG object in ProcessGetBlockData
Minor follow-up to 8e31cf9c9b5e9fdd01e8b220c08a3ccde5cf584c, which did the same.
This commit is contained in:
parent
bd5d1688b4
commit
fa2e74879a
@ -1096,7 +1096,7 @@ private:
|
|||||||
bool BlockRequestAllowed(const CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
bool BlockRequestAllowed(const CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||||
bool AlreadyHaveBlock(const uint256& block_hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
bool AlreadyHaveBlock(const uint256& block_hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
|
||||||
void ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv& inv)
|
void ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv& inv)
|
||||||
EXCLUSIVE_LOCKS_REQUIRED(!m_most_recent_block_mutex);
|
EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex, !m_most_recent_block_mutex);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validation logic for compact filters request handling.
|
* Validation logic for compact filters request handling.
|
||||||
@ -2522,7 +2522,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
|
|||||||
if (a_recent_compact_block && a_recent_compact_block->header.GetHash() == pindex->GetBlockHash()) {
|
if (a_recent_compact_block && a_recent_compact_block->header.GetHash() == pindex->GetBlockHash()) {
|
||||||
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, *a_recent_compact_block);
|
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, *a_recent_compact_block);
|
||||||
} else {
|
} else {
|
||||||
CBlockHeaderAndShortTxIDs cmpctblock{*pblock, FastRandomContext().rand64()};
|
CBlockHeaderAndShortTxIDs cmpctblock{*pblock, m_rng.rand64()};
|
||||||
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, cmpctblock);
|
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, cmpctblock);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user