aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
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/rpc/blockchain.cpp
parentbb8ae2c41941d0776968f75cec0de89247e952dc (diff)
downloadbitcoin-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/rpc/blockchain.cpp')
-rw-r--r--src/rpc/blockchain.cpp6
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");
}