aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-05-17 12:43:23 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-06-28 09:52:27 +0200
commitedb55e2777063dfeba0a52bbd0b92af8b4688501 (patch)
tree82db5d343132d77b8fdd5c99dcd4fcd92fca9e7c /src/init.cpp
parente2d680a32d757de0ef8eb836047a0daa1d82e3c4 (diff)
kernel: Pass interrupt reference to chainman
This and the following commit seek to decouple the libbitcoinkernel library from the shutdown code. As a library, it should it should have its own flexible interrupt infrastructure without relying on node-wide globals. The commit takes the first step towards this goal by de-globalising `ShutdownRequested` calls in kernel code. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: TheCharlatan <seb.kung@gmail.com>
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index e9421606ef..ac81ebab82 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1462,7 +1462,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
for (bool fLoaded = false; !fLoaded && !ShutdownRequested();) {
node.mempool = std::make_unique<CTxMemPool>(mempool_opts);
- node.chainman = std::make_unique<ChainstateManager>(chainman_opts, blockman_opts);
+ node.chainman = std::make_unique<ChainstateManager>(node.kernel->interrupt, chainman_opts, blockman_opts);
ChainstateManager& chainman = *node.chainman;
node::ChainstateLoadOptions options;