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:
marcofleon
2024-05-29 08:53:50 -07:00
parent 0048680467
commit 8defc182a3
2 changed files with 3 additions and 3 deletions

View File

@@ -120,7 +120,7 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
unsigned int nEvicted = 0; unsigned int nEvicted = 0;
auto nNow{Now<NodeSeconds>()}; auto nNow{Now<NodeSeconds>()};
if (nNextSweep <= nNow) { if (m_next_sweep <= nNow) {
// Sweep out expired orphan pool entries: // Sweep out expired orphan pool entries:
int nErased = 0; int nErased = 0;
auto nMinExpTime{nNow + ORPHAN_TX_EXPIRE_TIME - ORPHAN_TX_EXPIRE_INTERVAL}; 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. // 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); if (nErased > 0) LogPrint(BCLog::TXPACKAGES, "Erased %d orphan tx due to expiration\n", nErased);
} }
while (m_orphans.size() > max_orphans) while (m_orphans.size() > max_orphans)

View File

@@ -107,7 +107,7 @@ protected:
int EraseTxNoLock(const Wtxid& wtxid) EXCLUSIVE_LOCKS_REQUIRED(m_mutex); int EraseTxNoLock(const Wtxid& wtxid) EXCLUSIVE_LOCKS_REQUIRED(m_mutex);
/** Timestamp for the next scheduled sweep of expired orphans */ /** 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 #endif // BITCOIN_TXORPHANAGE_H