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.cpp | |
| 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.cpp')
| -rw-r--r-- | src/txmempool.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/txmempool.cpp b/src/txmempool.cpp index ca556bdc7..8a414f5de 100644 --- a/src/txmempool.cpp +++ b/src/txmempool.cpp @@ -1090,4 +1090,16 @@ void CTxMemPool::GetTransactionAncestry(const uint256& txid, size_t& ancestors, } } +bool CTxMemPool::IsLoaded() const +{ + LOCK(cs); + return m_is_loaded; +} + +void CTxMemPool::SetIsLoaded(bool loaded) +{ + LOCK(cs); + m_is_loaded = loaded; +} + SaltedTxidHasher::SaltedTxidHasher() : k0(GetRand(std::numeric_limits<uint64_t>::max())), k1(GetRand(std::numeric_limits<uint64_t>::max())) {} |