X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Frpcdump.cpp;h=6a83604c7b4d049652c210edf1505c672a320841;hb=9d14e64825d95061ea0857267646dfcb3d62e07a;hp=b0693ed27d559d0e710678739144b335e2c5c225;hpb=7f910f05a59a13fc96b8a4cafa4e6fdd5de725e4;p=novacoin.git diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index b0693ed..6a83604 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -39,6 +39,8 @@ Value importprivkey(const Array& params, bool fHelp) "importprivkey [label] [rescan=true]\n" "Adds a private key (as returned by dumpprivkey) to your wallet."); + EnsureWalletIsUnlocked(); + string strSecret = params[0].get_str(); string strLabel = ""; if (params.size() > 1) @@ -247,6 +249,8 @@ Value dumpmalleablekey(const Array& params, bool fHelp) "dumpmalleablekey \n" "Dump the private and public key pairs, which correspond to provided key view.\n"); + EnsureWalletIsUnlocked(); + CMalleableKey mKey; CMalleableKeyView keyView; keyView.SetString(params[0].get_str()); @@ -268,6 +272,9 @@ Value importmalleablekey(const Array& params, bool fHelp) "importmalleablekey \n" "Imports the private key pair into your wallet.\n"); + + EnsureWalletIsUnlocked(); + CMalleableKey mKey; bool fSuccess = mKey.SetString(params[0].get_str());