diff options
Diffstat (limited to 'src/bitcoin-chainstate.cpp')
-rw-r--r-- | src/bitcoin-chainstate.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bitcoin-chainstate.cpp b/src/bitcoin-chainstate.cpp index 2981fc6c2f..4656cb23e7 100644 --- a/src/bitcoin-chainstate.cpp +++ b/src/bitcoin-chainstate.cpp @@ -90,13 +90,13 @@ int main(int argc, char* argv[]) cache_sizes.coins = (450 << 20) - (2 << 20) - (2 << 22); node::ChainstateLoadOptions options; options.check_interrupt = [] { return false; }; - auto rv = node::LoadChainstate(chainman, cache_sizes, options); - if (rv.has_value()) { + auto [status, error] = node::LoadChainstate(chainman, cache_sizes, options); + if (status != node::ChainstateLoadStatus::SUCCESS) { std::cerr << "Failed to load Chain state from your datadir." << std::endl; goto epilogue; } else { - auto maybe_verify_error = node::VerifyLoadedChainstate(chainman, options); - if (maybe_verify_error.has_value()) { + std::tie(status, error) = node::VerifyLoadedChainstate(chainman, options); + if (status != node::ChainstateLoadStatus::SUCCESS) { std::cerr << "Failed to verify loaded Chain state from your datadir." << std::endl; goto epilogue; } |