diff options
author | Carl Dong <contact@carldong.me> | 2021-11-10 15:57:14 -0500 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2021-12-06 15:58:10 -0500 |
commit | ca7c0b934db68acdc410e3a82f1ed898382da2e5 (patch) | |
tree | f270e09b1d92fd1e3ac37e85e68a7f3918add8f0 /src/node/chainstate.h | |
parent | adf4912d77496b9a243476c5944528f95641f14d (diff) | |
download | bitcoin-ca7c0b934db68acdc410e3a82f1ed898382da2e5.tar.xz |
Split off VerifyLoadedChainstate
Diffstat (limited to 'src/node/chainstate.h')
-rw-r--r-- | src/node/chainstate.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/node/chainstate.h b/src/node/chainstate.h index 39621a31c5..c122391a41 100644 --- a/src/node/chainstate.h +++ b/src/node/chainstate.h @@ -22,8 +22,6 @@ enum class ChainstateLoadingError { ERROR_LOADCHAINTIP_FAILED, ERROR_GENERIC_BLOCKDB_OPEN_FAILED, ERROR_BLOCKS_WITNESS_INSUFFICIENTLY_VALIDATED, - ERROR_BLOCK_FROM_FUTURE, - ERROR_CORRUPTED_BLOCK_DB, SHUTDOWN_PROBED, }; @@ -61,8 +59,19 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset, bool fReindexChainState, int64_t nBlockTreeDBCache, int64_t nCoinDBCache, - int64_t nCoinCacheUsage, - unsigned int check_blocks, - unsigned int check_level); + int64_t nCoinCacheUsage); + +enum class ChainstateLoadVerifyError { + ERROR_BLOCK_FROM_FUTURE, + ERROR_CORRUPTED_BLOCK_DB, + ERROR_GENERIC_FAILURE, +}; + +std::optional<ChainstateLoadVerifyError> VerifyLoadedChainstate(ChainstateManager& chainman, + bool fReset, + bool fReindexChainState, + const CChainParams& chainparams, + unsigned int check_blocks, + unsigned int check_level); #endif // BITCOIN_NODE_CHAINSTATE_H |