mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-07 20:43:03 +02:00
increase txorphan harness stability
initialize variable
This commit is contained in:
@@ -119,7 +119,6 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
|
||||
LOCK(m_mutex);
|
||||
|
||||
unsigned int nEvicted = 0;
|
||||
static NodeSeconds nNextSweep;
|
||||
auto nNow{Now<NodeSeconds>()};
|
||||
if (nNextSweep <= nNow) {
|
||||
// Sweep out expired orphan pool entries:
|
||||
|
||||
@@ -105,6 +105,9 @@ protected:
|
||||
|
||||
/** Erase an orphan by wtxid */
|
||||
int EraseTxNoLock(const Wtxid& wtxid) EXCLUSIVE_LOCKS_REQUIRED(m_mutex);
|
||||
|
||||
/** Timestamp for the next scheduled sweep of expired orphans */
|
||||
NodeSeconds nNextSweep GUARDED_BY(m_mutex){0s};
|
||||
};
|
||||
|
||||
#endif // BITCOIN_TXORPHANAGE_H
|
||||
|
||||
Reference in New Issue
Block a user