refactor: Don't embed translated string in untranslated string.

This could produce an english error message containing non-english string
fragments if PopulateAndValidateSnapshot started returning any translated
strings in the future. This change is also needed to make the next
scripted-diff commit work.
This commit is contained in:
Ryan Ofsky 2024-10-09 10:09:08 -04:00
parent 058021969b
commit 831d2bfcf9

View file

@ -5811,7 +5811,7 @@ util::Result<CBlockIndex*> ChainstateManager::ActivateSnapshot(
if (auto res{this->PopulateAndValidateSnapshot(*snapshot_chainstate, coins_file, metadata)}; !res) {
LOCK(::cs_main);
return cleanup_bad_snapshot(strprintf(Untranslated("Population failed: %s"), util::ErrorString(res)));
return cleanup_bad_snapshot(Untranslated(strprintf("Population failed: %s", util::ErrorString(res).original)));
}
LOCK(::cs_main); // cs_main required for rest of snapshot activation.