diff options
author | Andrew Chow <github@achow101.com> | 2022-11-29 16:05:51 -0500 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-11-30 10:30:57 -0500 |
commit | 5e65a216d1fd00c447757736d4f2899d235e731a (patch) | |
tree | 728bc1b83273b73af11d99585254502de225b1f8 /src/wallet/rpc | |
parent | 88afc73ae0c67a4482ecd3d77eb2a8fd2673f82d (diff) | |
download | bitcoin-5e65a216d1fd00c447757736d4f2899d235e731a.tar.xz |
wallet: Explicitly say migratewallet on encrypted wallets is unsupported
Diffstat (limited to 'src/wallet/rpc')
-rw-r--r-- | src/wallet/rpc/wallet.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/rpc/wallet.cpp b/src/wallet/rpc/wallet.cpp index 675c4a759d..971814e9cd 100644 --- a/src/wallet/rpc/wallet.cpp +++ b/src/wallet/rpc/wallet.cpp @@ -730,7 +730,9 @@ static RPCHelpMan migratewallet() std::shared_ptr<CWallet> wallet = GetWalletForJSONRPCRequest(request); if (!wallet) return NullUniValue; - EnsureWalletIsUnlocked(*wallet); + if (wallet->IsCrypted()) { + throw JSONRPCError(RPC_WALLET_WRONG_ENC_STATE, "Error: migratewallet on encrypted wallets is currently unsupported."); + } WalletContext& context = EnsureWalletContext(request.context); |