aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorgustavonalle <gustavonalle@gmail.com>2018-09-24 16:10:23 +0100
committerMarcoFalke <falke.marco@gmail.com>2018-11-28 15:35:05 -0500
commitbb9069555120474a53caf55027c2bdc1d4cf383c (patch)
tree247163a2cc82c868fccc54334ff7df9b38099e90 /src/wallet
parent5150accdd2a7c7f0edf964d56bd7d34b5f740cdc (diff)
downloadbitcoin-bb9069555120474a53caf55027c2bdc1d4cf383c.tar.xz
[wallet] Ensure wallet is unlocked before signing
Github-Pull: #14310 Rebased-From: db15805668e923c3493d77122d20926496cf6a1a
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/rpcwallet.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index a3de618059..9ddd21126a 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -3732,6 +3732,8 @@ UniValue signrawtransactionwithwallet(const JSONRPCRequest& request)
// Sign the transaction
LOCK2(cs_main, pwallet->cs_wallet);
+ EnsureWalletIsUnlocked(pwallet);
+
return SignTransaction(mtx, request.params[1], pwallet, false, request.params[2]);
}