mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Explicitly ensure that wallet is unlocked in importprivkey
This makes for a more useful error reply (fixes #957).
This commit is contained in:
parent
f46babc8c8
commit
d78f35a909
@ -86,6 +86,8 @@ Value importprivkey(const Array& params, bool fHelp)
|
||||
+ HelpExampleRpc("importprivkey", "\"mykey\", \"testing\", false")
|
||||
);
|
||||
|
||||
EnsureWalletIsUnlocked();
|
||||
|
||||
string strSecret = params[0].get_str();
|
||||
string strLabel = "";
|
||||
if (params.size() > 1)
|
||||
|
Loading…
Reference in New Issue
Block a user