diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-05-17 12:43:23 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-06-28 09:52:27 +0200 |
commit | edb55e2777063dfeba0a52bbd0b92af8b4688501 (patch) | |
tree | 82db5d343132d77b8fdd5c99dcd4fcd92fca9e7c /src/txdb.h | |
parent | e2d680a32d757de0ef8eb836047a0daa1d82e3c4 (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/txdb.h')
-rw-r--r-- | src/txdb.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/txdb.h b/src/txdb.h index 04d0ecb39f..6405437be9 100644 --- a/src/txdb.h +++ b/src/txdb.h @@ -29,6 +29,9 @@ class uint256; namespace Consensus { struct Params; }; +namespace util { +class SignalInterrupt; +} // namespace util //! -dbcache default (MiB) static const int64_t nDefaultDbCache = 450; @@ -98,7 +101,7 @@ public: void ReadReindexing(bool &fReindexing); bool WriteFlag(const std::string &name, bool fValue); bool ReadFlag(const std::string &name, bool &fValue); - bool LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex) + bool LoadBlockIndexGuts(const Consensus::Params& consensusParams, std::function<CBlockIndex*(const uint256&)> insertBlockIndex, const util::SignalInterrupt& interrupt) EXCLUSIVE_LOCKS_REQUIRED(::cs_main); }; |