aboutsummaryrefslogtreecommitdiff
path: root/src/node/chainstate.h
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-09-22 15:36:24 -0400
committerCarl Dong <contact@carldong.me>2021-12-07 14:48:49 -0500
commit4da9c076d1cf12728730bb1f7e8906d4e9bfaba5 (patch)
tree507a2cce76d7e59f936ef54c8d822765170247a8 /src/node/chainstate.h
parent05441c2dc5f60e2025476d8ec94c9025032d118c (diff)
downloadbitcoin-4da9c076d1cf12728730bb1f7e8906d4e9bfaba5.tar.xz
node/chainstate: Decouple from ShutdownRequested
...instead allow optionally passing in a std::function<bool()>
Diffstat (limited to 'src/node/chainstate.h')
-rw-r--r--src/node/chainstate.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node/chainstate.h b/src/node/chainstate.h
index 3c950409d3..735906a540 100644
--- a/src/node/chainstate.h
+++ b/src/node/chainstate.h
@@ -45,10 +45,10 @@ enum class ChainstateLoadingError {
* differentiable by the specific enumerator.
*
* Note that a return value of SHUTDOWN_PROBED means ONLY that "during
- * this sequence, when we explicitly checked ShutdownRequested() at
+ * this sequence, when we explicitly checked shutdown_requested() at
* arbitrary points, one of those calls returned true". Therefore, a
* return value other than SHUTDOWN_PROBED does not guarantee that
- * ShutdownRequested() hasn't been called indirectly.
+ * shutdown_requested() hasn't been called indirectly.
* - else
* - Success!
*/
@@ -61,6 +61,7 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
int64_t nBlockTreeDBCache,
int64_t nCoinDBCache,
int64_t nCoinCacheUsage,
+ std::function<bool()> shutdown_requested = nullptr,
std::function<void()> coins_error_cb = nullptr);
enum class ChainstateLoadVerifyError {