Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-chainstate.cpp
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | int main(int argc, char *argv[]) { | ||||
node::ChainstateLoadOptions options; | node::ChainstateLoadOptions options; | ||||
options.check_interrupt = [] { return false; }; | options.check_interrupt = [] { return false; }; | ||||
auto [status, error] = node::LoadChainstate(chainman, cache_sizes, options); | auto [status, error] = node::LoadChainstate(chainman, cache_sizes, options); | ||||
if (status != node::ChainstateLoadStatus::SUCCESS) { | if (status != node::ChainstateLoadStatus::SUCCESS) { | ||||
std::cerr << "Failed to load Chain state from your datadir." | std::cerr << "Failed to load Chain state from your datadir." | ||||
<< std::endl; | << std::endl; | ||||
goto epilogue; | goto epilogue; | ||||
} | } | ||||
std::tie(status, error) = | std::tie(status, error) = node::VerifyLoadedChainstate(chainman, options); | ||||
node::VerifyLoadedChainstate(chainman, options, config); | |||||
if (status != node::ChainstateLoadStatus::SUCCESS) { | if (status != node::ChainstateLoadStatus::SUCCESS) { | ||||
std::cerr << "Failed to verify loaded Chain state from your datadir." | std::cerr << "Failed to verify loaded Chain state from your datadir." | ||||
<< std::endl; | << std::endl; | ||||
goto epilogue; | goto epilogue; | ||||
} | } | ||||
for (Chainstate *chainstate : | for (Chainstate *chainstate : | ||||
WITH_LOCK(::cs_main, return chainman.GetAll())) { | WITH_LOCK(::cs_main, return chainman.GetAll())) { | ||||
▲ Show 20 Lines • Show All 182 Lines • Show Last 20 Lines |