We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 746d466 commit af52bf5Copy full SHA for af52bf5
src/net_processing.cpp
@@ -553,9 +553,10 @@ void EraseOrphansFor(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
553
unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
554
{
555
unsigned int nEvicted = 0;
556
+ FastRandomContext rng;
557
while (mapOrphanTransactions.size() > nMaxOrphans) {
558
// Evict a random orphan:
- uint256 randomhash = GetRandHash();
559
+ uint256 randomhash = rng.rand256();
560
std::map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.lower_bound(randomhash);
561
if (it == mapOrphanTransactions.end())
562
it = mapOrphanTransactions.begin();
0 commit comments