Skip to content

Commit

Permalink
Make sure wallet is unlocked before dumping key (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar authored Aug 25, 2021
1 parent 5bd9e0b commit 949a5ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/spv/spv_rpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,8 @@ static UniValue spv_dumpprivkey(const JSONRPCRequest& request)
auto locked_chain = pwallet->chain().lock();
LOCK2(pwallet->cs_wallet, locked_chain->mutex());

EnsureWalletIsUnlocked(pwallet);

std::string strAddress = request.params[0].get_str();

return spv::pspv->DumpBitcoinPrivKey(pwallet, strAddress);
Expand Down

0 comments on commit 949a5ef

Please sign in to comment.