diff options
author | Jon Atack <jon@atack.com> | 2020-11-17 19:18:12 +0100 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2020-11-19 20:00:56 +0100 |
commit | 3eb6f8b2e61c24a22ea9396d86672307845f35eb (patch) | |
tree | 40b93928a05d3dba8a9a59863379291815679502 /src/wallet | |
parent | ca8cd893bb56bf5d455154b0498b1f58f77d20ed (diff) |
wallet (not for backport): improve upgradewallet error messages
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 3ce8272fb9..12a725b5a2 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -4111,9 +4111,8 @@ bool CWallet::UpgradeWallet(int version, bilingual_str& error) } else { WalletLogPrintf("Allowing wallet upgrade up to %i\n", version); } - if (version < prev_version) - { - error = _("Cannot downgrade wallet"); + if (version < prev_version) { + error = strprintf(_("Cannot downgrade wallet from version %i to version %i. Wallet version unchanged."), prev_version, version); return false; } @@ -4121,7 +4120,7 @@ bool CWallet::UpgradeWallet(int version, bilingual_str& error) // Do not upgrade versions to any version between HD_SPLIT and FEATURE_PRE_SPLIT_KEYPOOL unless already supporting HD_SPLIT if (!CanSupportFeature(FEATURE_HD_SPLIT) && version >= FEATURE_HD_SPLIT && version < FEATURE_PRE_SPLIT_KEYPOOL) { - error = _("Cannot upgrade a non HD split wallet without upgrading to support pre split keypool. Please use version 169900 or no version specified."); + error = strprintf(_("Cannot upgrade a non HD split wallet from version %i to version %i without upgrading to support pre-split keypool. Please use version %i or no version specified."), prev_version, version, FEATURE_PRE_SPLIT_KEYPOOL); return false; } |