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 committed 2024-12-04 15:09:05 -04:00
1 parent 058021969b
commit 831d2bfcf9
1 file changed
+1 -1
+1 -1
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.