Skip to content

Commit 8defc18

Browse files
committed
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
1 parent 0048680 commit 8defc18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/txorphanage.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
120120

121121
unsigned int nEvicted = 0;
122122
auto nNow{Now<NodeSeconds>()};
123-
if (nNextSweep <= nNow) {
123+
if (m_next_sweep <= nNow) {
124124
// Sweep out expired orphan pool entries:
125125
int nErased = 0;
126126
auto nMinExpTime{nNow + ORPHAN_TX_EXPIRE_TIME - ORPHAN_TX_EXPIRE_INTERVAL};
@@ -135,7 +135,7 @@ void TxOrphanage::LimitOrphans(unsigned int max_orphans, FastRandomContext& rng)
135135
}
136136
}
137137
// Sweep again 5 minutes after the next entry that expires in order to batch the linear scan.
138-
nNextSweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL;
138+
m_next_sweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL;
139139
if (nErased > 0) LogPrint(BCLog::TXPACKAGES, "Erased %d orphan tx due to expiration\n", nErased);
140140
}
141141
while (m_orphans.size() > max_orphans)

src/txorphanage.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ class TxOrphanage {
107107
int EraseTxNoLock(const Wtxid& wtxid) EXCLUSIVE_LOCKS_REQUIRED(m_mutex);
108108

109109
/** Timestamp for the next scheduled sweep of expired orphans */
110-
NodeSeconds nNextSweep GUARDED_BY(m_mutex){0s};
110+
NodeSeconds m_next_sweep GUARDED_BY(m_mutex){0s};
111111
};
112112

113113
#endif // BITCOIN_TXORPHANAGE_H

0 commit comments

Comments
 (0)