mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-01 03:01:05 +00:00
Merge bitcoin/bitcoin#30393: refactor: use existing RNG object in ProcessGetBlockData
fa2e74879a3f7423c8d01aa1376b2bd9ccf5658d net_processing: use existing RNG object in ProcessGetBlockData (MarcoFalke)
Pull request description:
Small follow-up to commit 8e31cf9c9b5e9fdd01e8b220c08a3ccde5cf584c
ACKs for top commit:
dergoegge:
Code review ACK fa2e74879a3f7423c8d01aa1376b2bd9ccf5658d
glozow:
ACK fa2e74879a3f7423c8d01aa1376b2bd9ccf5658d
Tree-SHA512: 12709c79e6eefad184609b7306e0f65cb00123e39636cf8b7d538feb25c05ba3c36aa41468886c904a5f44fea267e67f9c4fbbab8733753d1c891b90fa40ce8b
This commit is contained in:
commit
79b8472040
@ -1096,7 +1096,7 @@ private:
|
||||
bool BlockRequestAllowed(const CBlockIndex* pindex) 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)
|
||||
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.
|
||||
@ -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()) {
|
||||
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, *a_recent_compact_block);
|
||||
} else {
|
||||
CBlockHeaderAndShortTxIDs cmpctblock{*pblock, FastRandomContext().rand64()};
|
||||
CBlockHeaderAndShortTxIDs cmpctblock{*pblock, m_rng.rand64()};
|
||||
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, cmpctblock);
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user