aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorBen Woosley <ben.woosley@gmail.com>2019-03-07 09:54:44 -0500
committerBen Woosley <ben.woosley@gmail.com>2019-03-22 02:31:25 -0700
commiteffe81f7503d2ca3c88cfdea687f9f997f353e0d (patch)
treeede6c685bd0d9e24fd58aab6d4faa69baa69781f /src/txmempool.h
parentbb8ae2c41941d0776968f75cec0de89247e952dc (diff)
Move g_is_mempool_loaded into CTxMemPool::m_is_loaded
So the loaded state is explicitly mempool-specific.
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index a8a0f7fa45..3ada47a28e 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -455,6 +455,8 @@ private:
void trackPackageRemoved(const CFeeRate& rate) EXCLUSIVE_LOCKS_REQUIRED(cs);
+ bool m_is_loaded GUARDED_BY(cs){false};
+
public:
static const int ROLLING_FEE_HALFLIFE = 60 * 60 * 12; // public only for testing
@@ -672,6 +674,12 @@ public:
*/
void GetTransactionAncestry(const uint256& txid, size_t& ancestors, size_t& descendants) const;
+ /** @returns true if the mempool is fully loaded */
+ bool IsLoaded() const;
+
+ /** Sets the current loaded state */
+ void SetIsLoaded(bool loaded);
+
unsigned long size() const
{
LOCK(cs);