From fae51a5c6f4270a1088e6295b10a8cc45988ae46 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Mon, 19 Aug 2019 18:12:35 -0400 Subject: wallet: Avoid translating RPC errors when loading wallets Common errors and warnings should be translated when displayed in the GUI, but not translated when displayed elsewhere. The wallet method CreateWalletFromFile does not know its caller, so this commit changes it to return a bilingual_str to the caller. --- src/wallet/db.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/wallet/db.h') diff --git a/src/wallet/db.h b/src/wallet/db.h index 1c5f42abca..1bf3375475 100644 --- a/src/wallet/db.h +++ b/src/wallet/db.h @@ -21,6 +21,8 @@ #include +struct bilingual_str; + static const unsigned int DEFAULT_WALLET_DBLOGSIZE = 100; static const bool DEFAULT_WALLET_PRIVDB = true; @@ -242,9 +244,9 @@ public: ideal to be called periodically */ static bool PeriodicFlush(BerkeleyDatabase& database); /* verifies the database environment */ - static bool VerifyEnvironment(const fs::path& file_path, std::string& errorStr); + static bool VerifyEnvironment(const fs::path& file_path, bilingual_str& errorStr); /* verifies the database file */ - static bool VerifyDatabaseFile(const fs::path& file_path, std::vector& warnings, std::string& errorStr, BerkeleyEnvironment::recoverFunc_type recoverFunc); + static bool VerifyDatabaseFile(const fs::path& file_path, std::vector& warnings, bilingual_str& errorStr, BerkeleyEnvironment::recoverFunc_type recoverFunc); template bool Read(const K& key, T& value) -- cgit v1.2.3