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/rpc/blockchain.cpp | |
parent | bb8ae2c41941d0776968f75cec0de89247e952dc (diff) |
Move g_is_mempool_loaded into CTxMemPool::m_is_loaded
So the loaded state is explicitly mempool-specific.
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r-- | src/rpc/blockchain.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index cebb331f38..1c20feba12 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1484,7 +1484,7 @@ static UniValue getchaintips(const JSONRPCRequest& request) UniValue MempoolInfoToJSON(const CTxMemPool& pool) { UniValue ret(UniValue::VOBJ); - ret.pushKV("loaded", g_is_mempool_loaded); + ret.pushKV("loaded", pool.IsLoaded()); ret.pushKV("size", (int64_t)pool.size()); ret.pushKV("bytes", (int64_t)pool.GetTotalTxSize()); ret.pushKV("usage", (int64_t)pool.DynamicMemoryUsage()); @@ -2056,11 +2056,11 @@ static UniValue savemempool(const JSONRPCRequest& request) }.ToString()); } - if (!g_is_mempool_loaded) { + if (!::mempool.IsLoaded()) { throw JSONRPCError(RPC_MISC_ERROR, "The mempool was not loaded yet"); } - if (!DumpMempool()) { + if (!DumpMempool(::mempool)) { throw JSONRPCError(RPC_MISC_ERROR, "Unable to dump mempool to disk"); } |