aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
diff options
context:
space:
mode:
authorRyan Ofsky <ryan@ofsky.org>2023-06-12 11:48:27 -0400
committerRyan Ofsky <ryan@ofsky.org>2023-06-15 15:11:32 -0400
commit9047337d369d800e6eca4d3b686139073a8e8905 (patch)
treea7ccd140ad3d7bede49a4c01238958327ac87c94 /src/init.cpp
parentb3db18a0126bc4181d2a0880c27f45d203d06179 (diff)
validation: Stricter assumeutxo error handling in LoadChainstate
Make LoadChainstate return an explicit error when snapshot validation succeeds, but there is an error trying to replace the background chainstate with the snapshot chainstate. Previously in this case LoadChainstate would trigger a shutdown and return INTERRUPTED, now it will return an actual error code. There's no real change to behavior other than error message being formatted a little differently. Motivation for this change is to replace error handling via callbacks with error handling via return value ahead of https://github.com/bitcoin/bitcoin/pull/27861
Diffstat (limited to 'src/init.cpp')
-rw-r--r--src/init.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 38e1dbb4a2..234e338640 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1530,7 +1530,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
}
}
- if (status == node::ChainstateLoadStatus::FAILURE_INCOMPATIBLE_DB || status == node::ChainstateLoadStatus::FAILURE_INSUFFICIENT_DBCACHE) {
+ if (status == node::ChainstateLoadStatus::FAILURE_FATAL || status == node::ChainstateLoadStatus::FAILURE_INCOMPATIBLE_DB || status == node::ChainstateLoadStatus::FAILURE_INSUFFICIENT_DBCACHE) {
return InitError(error);
}