increase txorphan harness stability
initialize variable
This commit is contained in:
1 parent
10164916f7
commit
0048680467
2 files changed
+3
-1
No files matched your search
@@ -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