aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-chainstate.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2022-05-27 16:47:05 -0400
committerCarl Dong <contact@carldong.me>2022-06-02 11:42:12 -0400
commit265d6393bf9ef52e7ef7de97ca9c031da82a5ad1 (patch)
tree5fd6e341d903e3b78c7ad25c090d08fbcf9a6034 /src/bitcoin-chainstate.cpp
parentfed085a1a4cd2787202752b6a0d98e42dce97f09 (diff)
downloadbitcoin-265d6393bf9ef52e7ef7de97ca9c031da82a5ad1.tar.xz
Move init::SanityCheck to kernel::SanityCheck
Diffstat (limited to 'src/bitcoin-chainstate.cpp')
-rw-r--r--src/bitcoin-chainstate.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp
index 6749ed5918..3f2b298c1f 100644
--- a/src/bitcoin-chainstate.cpp
+++ b/src/bitcoin-chainstate.cpp
@@ -11,12 +11,12 @@
//
// It is part of the libbitcoinkernel project.
+#include <kernel/checks.h>
#include <kernel/context.h>
#include <chainparams.h>
#include <consensus/validation.h>
#include <core_io.h>
-#include <init/common.h>
#include <node/blockstorage.h>
#include <node/chainstate.h>
#include <scheduler.h>
@@ -26,6 +26,7 @@
#include <validation.h>
#include <validationinterface.h>
+#include <cassert>
#include <filesystem>
#include <functional>
#include <iosfwd>
@@ -52,6 +53,10 @@ int main(int argc, char* argv[])
const CChainParams& chainparams = Params();
kernel::Context kernel_context{};
+ // We can't use a goto here, but we can use an assert since none of the
+ // things instantiated so far requires running the epilogue to be torn down
+ // properly
+ assert(kernel::SanityChecks(kernel_context));
// Necessary for CheckInputScripts (eventually called by ProcessNewBlock),
// which will try the script cache first and fall back to actually