mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 18:02:36 +02:00
scripted-diff: Replace nNextSweep with m_next_sweep
-BEGIN VERIFY SCRIPT- sed -i 's/nNextSweep/m_next_sweep/g' $(git grep -l 'nNextSweep') -END VERIFY SCRIPT- fixing to match style
This commit is contained in:
@@ -120,7 +120,7 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
|
||||
|
||||
unsigned int nEvicted = 0;
|
||||
auto nNow{Now<NodeSeconds>()};
|
||||
if (nNextSweep <= nNow) {
|
||||
if (m_next_sweep <= nNow) {
|
||||
// Sweep out expired orphan pool entries:
|
||||
int nErased = 0;
|
||||
auto nMinExpTime{nNow + ORPHAN_TX_EXPIRE_TIME - ORPHAN_TX_EXPIRE_INTERVAL};
|
||||
@@ -135,7 +135,7 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
|
||||
}
|
||||
}
|
||||
// Sweep again 5 minutes after the next entry that expires in order to batch the linear scan.
|
||||
nNextSweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL;
|
||||
m_next_sweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL;
|
||||
if (nErased > 0) LogPrint(BCLog::TXPACKAGES, "Erased %d orphan tx due to expiration\n", nErased);
|
||||
}
|
||||
while (m_orphans.size() > max_orphans)
|
||||
|
@@ -107,7 +107,7 @@ protected:
|
||||
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};
|
||||
NodeSeconds m_next_sweep GUARDED_BY(m_mutex){0s};
|
||||
};
|
||||
|
||||
#endif // BITCOIN_TXORPHANAGE_H
|
||||
|
Reference in New Issue
Block a user