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 3db746b commit 273d025Copy full SHA for 273d025
src/net_processing.cpp
@@ -779,10 +779,11 @@ unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans)
779
nNextSweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL;
780
if (nErased > 0) LogPrint(BCLog::MEMPOOL, "Erased %d orphan tx due to expiration\n", nErased);
781
}
782
+ FastRandomContext rng;
783
while (mapOrphanTransactions.size() > nMaxOrphans)
784
{
785
// Evict a random orphan:
- uint256 randomhash = GetRandHash();
786
+ uint256 randomhash = rng.rand256();
787
std::map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.lower_bound(randomhash);
788
if (it == mapOrphanTransactions.end())
789
it = mapOrphanTransactions.begin();
0 commit comments