mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 02:33:24 -03:00
increase txorphan harness stability
initialize variable
This commit is contained in:
parent
10164916f7
commit
0048680467
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue