We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8b04db1 commit c1785d2Copy full SHA for c1785d2
src/wallet/rpcwallet.cpp
@@ -380,15 +380,15 @@ UniValue upgradewallet(const JSONRPCRequest& request)
380
);
381
382
EnsureWallet();
383
- EnsureWalletIsUnlocked();
384
-
385
LOCK2(cs_main, pwalletMain->cs_wallet);
386
387
- // Do not do anything to non-HD wallets
388
- if (pwalletMain->HasSaplingSPKM()) {
+ // Do not do anything to wallets already upgraded
+ if (pwalletMain->CanSupportFeature(FEATURE_LATEST)) {
389
throw JSONRPCError(RPC_WALLET_ERROR, "Cannot upgrade the wallet. The wallet is already running the latest version");
390
}
391
+ EnsureWalletIsUnlocked();
+
392
// Get version
393
int prev_version = pwalletMain->GetVersion();
394
// Upgrade wallet's version
0 commit comments