diff options
| author | Ben Woosley <[email protected]> | 2019-03-07 09:54:44 -0500 |
|---|---|---|
| committer | Ben Woosley <[email protected]> | 2019-03-22 02:31:25 -0700 |
| commit | effe81f7503d2ca3c88cfdea687f9f997f353e0d (patch) | |
| tree | ede6c685bd0d9e24fd58aab6d4faa69baa69781f /src/txmempool.h | |
| parent | rpc: Expose g_is_mempool_loaded via getmempoolinfo and /rest/mempool/info.json (diff) | |
| download | discoin-effe81f7503d2ca3c88cfdea687f9f997f353e0d.tar.xz discoin-effe81f7503d2ca3c88cfdea687f9f997f353e0d.zip | |
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.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h index a8a0f7fa4..3ada47a28 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); |