diff options
author | Carl Dong <contact@carldong.me> | 2021-08-18 13:39:34 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-12-06 16:41:33 -0500 |
commit | b345979a2b03b671c0984edd7e48e0baec2e2f34 (patch) | |
tree | 9b4950b2309eb78dbadb6711c3406205dfb8eff5 /src/node/chainstate.h | |
parent | ca7c0b934db68acdc410e3a82f1ed898382da2e5 (diff) | |
download | bitcoin-b345979a2b03b671c0984edd7e48e0baec2e2f34.tar.xz |
node/chainstate: Decouple from concept of uiInterface
...instead allow the caller to optionally pass in callbacks which are
triggered for certain events.
Behaviour change: The string "Verifying blocks..." was previously
printed for each chainstate in chainman which did not have an
effectively empty coinsview, now it will be printed once unconditionally
before we call VerifyLoadedChain.
Diffstat (limited to 'src/node/chainstate.h')
-rw-r--r-- | src/node/chainstate.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/node/chainstate.h b/src/node/chainstate.h index c122391a41..84a86a082b 100644 --- a/src/node/chainstate.h +++ b/src/node/chainstate.h @@ -6,6 +6,7 @@ #define BITCOIN_NODE_CHAINSTATE_H #include <cstdint> // for int64_t +#include <functional> // for std::function #include <optional> // for std::optional class CChainParams; @@ -59,7 +60,8 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset, bool fReindexChainState, int64_t nBlockTreeDBCache, int64_t nCoinDBCache, - int64_t nCoinCacheUsage); + int64_t nCoinCacheUsage, + std::function<void()> coins_error_cb = nullptr); enum class ChainstateLoadVerifyError { ERROR_BLOCK_FROM_FUTURE, |