mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Merge 821f5c824f into merged_master (Bitcoin PR bitcoin/bitcoin#25487)
This commit is contained in:
commit
076e809b74
23 changed files with 373 additions and 195 deletions
13
src/init.cpp
13
src/init.cpp
|
|
@ -10,6 +10,7 @@
|
|||
#include <init.h>
|
||||
|
||||
#include <kernel/checks.h>
|
||||
#include <kernel/mempool_persist.h>
|
||||
|
||||
#include <addrman.h>
|
||||
#include <banman.h>
|
||||
|
|
@ -42,6 +43,7 @@
|
|||
#include <node/chainstate.h>
|
||||
#include <node/context.h>
|
||||
#include <node/interface_ui.h>
|
||||
#include <node/mempool_persist_args.h>
|
||||
#include <node/miner.h>
|
||||
#include <policy/feerate.h>
|
||||
#include <policy/fees.h>
|
||||
|
|
@ -106,14 +108,19 @@
|
|||
#include <zmq/zmqrpc.h>
|
||||
#endif
|
||||
|
||||
using kernel::DumpMempool;
|
||||
|
||||
using node::CacheSizes;
|
||||
using node::CalculateCacheSizes;
|
||||
using node::ChainstateLoadVerifyError;
|
||||
using node::ChainstateLoadingError;
|
||||
using node::CleanupBlockRevFiles;
|
||||
using node::DEFAULT_PERSIST_MEMPOOL;
|
||||
using node::DEFAULT_PRINTPRIORITY;
|
||||
using node::DEFAULT_STOPAFTERBLOCKIMPORT;
|
||||
using node::LoadChainstate;
|
||||
using node::MempoolPath;
|
||||
using node::ShouldPersistMempool;
|
||||
using node::NodeContext;
|
||||
using node::ThreadImport;
|
||||
using node::VerifyLoadedChainstate;
|
||||
|
|
@ -254,8 +261,8 @@ void Shutdown(NodeContext& node)
|
|||
node.addrman.reset();
|
||||
node.netgroupman.reset();
|
||||
|
||||
if (node.mempool && node.mempool->IsLoaded() && node.args->GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
|
||||
DumpMempool(*node.mempool);
|
||||
if (node.mempool && node.mempool->GetLoadTried() && ShouldPersistMempool(*node.args)) {
|
||||
DumpMempool(*node.mempool, MempoolPath(*node.args));
|
||||
}
|
||||
|
||||
// Drop transactions we were still watching, and record fee estimations.
|
||||
|
|
@ -1808,7 +1815,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
|||
}
|
||||
|
||||
chainman.m_load_block = std::thread(&util::TraceThread, "loadblk", [=, &chainman, &args] {
|
||||
ThreadImport(chainman, vImportFiles, args);
|
||||
ThreadImport(chainman, vImportFiles, args, ShouldPersistMempool(args) ? MempoolPath(args) : fs::path{});
|
||||
});
|
||||
|
||||
// Wait for genesis block to be processed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue