Skip to content

Commit 79b8472

Browse files
committed
Merge bitcoin/bitcoin#30393: refactor: use existing RNG object in ProcessGetBlockData
fa2e748 net_processing: use existing RNG object in ProcessGetBlockData (MarcoFalke) Pull request description: Small follow-up to commit 8e31cf9 ACKs for top commit: dergoegge: Code review ACK fa2e748 glozow: ACK fa2e748 Tree-SHA512: 12709c79e6eefad184609b7306e0f65cb00123e39636cf8b7d538feb25c05ba3c36aa41468886c904a5f44fea267e67f9c4fbbab8733753d1c891b90fa40ce8b
2 parents 1f9d307 + fa2e748 commit 79b8472

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
@@ -1096,7 +1096,7 @@ class PeerManagerImpl final : public PeerManager
10961096
bool BlockRequestAllowed(const CBlockIndex* pindex) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
10971097
bool AlreadyHaveBlock(const uint256& block_hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
10981098
void ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv& inv)
1099-
EXCLUSIVE_LOCKS_REQUIRED(!m_most_recent_block_mutex);
1099+
EXCLUSIVE_LOCKS_REQUIRED(g_msgproc_mutex, !m_most_recent_block_mutex);
11001100

11011101
/**
11021102
* Validation logic for compact filters request handling.
@@ -2522,7 +2522,7 @@ void PeerManagerImpl::ProcessGetBlockData(CNode& pfrom, Peer& peer, const CInv&
25222522
if (a_recent_compact_block && a_recent_compact_block->header.GetHash() == pindex->GetBlockHash()) {
25232523
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, *a_recent_compact_block);
25242524
} else {
2525-
CBlockHeaderAndShortTxIDs cmpctblock{*pblock, FastRandomContext().rand64()};
2525+
CBlockHeaderAndShortTxIDs cmpctblock{*pblock, m_rng.rand64()};
25262526
MakeAndPushMessage(pfrom, NetMsgType::CMPCTBLOCK, cmpctblock);
25272527
}
25282528
} else {

0 commit comments

Comments
 (0)