test: Check that the GUI interactive reindex works

This commit is contained in:
MarcoFalke
2025-07-15 18:14:50 +02:00
parent faaaddaaf8
commit fac90e5261
4 changed files with 39 additions and 2 deletions

View File

@@ -1737,10 +1737,11 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
args);
if (status == ChainstateLoadStatus::FAILURE && !do_reindex && !ShutdownRequested(node)) {
// suggest a reindex
bool do_retry = uiInterface.ThreadSafeQuestion(
bool do_retry{HasTestOption(args, "reindex_after_failure_noninteractive_yes") ||
uiInterface.ThreadSafeQuestion(
error + Untranslated(".\n\n") + _("Do you want to rebuild the databases now?"),
error.original + ".\nPlease restart with -reindex or -reindex-chainstate to recover.",
"", CClientUIInterface::MSG_ERROR | CClientUIInterface::BTN_ABORT);
"", CClientUIInterface::MSG_ERROR | CClientUIInterface::BTN_ABORT)};
if (!do_retry) {
return false;
}