diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2019-03-07 09:54:44 -0500 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2019-03-22 02:31:25 -0700 |
commit | effe81f7503d2ca3c88cfdea687f9f997f353e0d (patch) | |
tree | ede6c685bd0d9e24fd58aab6d4faa69baa69781f /src/txmempool.cpp | |
parent | bb8ae2c41941d0776968f75cec0de89247e952dc (diff) | |
download | bitcoin-effe81f7503d2ca3c88cfdea687f9f997f353e0d.tar.xz |
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 ca556bdc7b..8a414f5dec 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())) {} |