X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Frpcdump.cpp;h=d59536e2547eb6b1402a13451d91e4067cc0bb45;hb=882164196e5b1971313493f95a6d027f05e2ec92;hp=f3978fbce8aa481b5d4e47d574971beeebaf24db;hpb=95d888a6d1f659a5cb81124e0d97966b9de1f139;p=novacoin.git diff --git a/src/rpcdump.cpp b/src/rpcdump.cpp index f3978fb..d59536e 100644 --- a/src/rpcdump.cpp +++ b/src/rpcdump.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2011 Bitcoin Developers +// Copyright (c) 2009-2012 Bitcoin Developers // Distributed under the MIT/X11 software license, see the accompanying // file license.txt or http://www.opensource.org/licenses/mit-license.php. @@ -62,7 +62,9 @@ Value importprivkey(const Array& params, bool fHelp) if (!fGood) throw JSONRPCError(-5,"Invalid private key"); CKey key; - key.SetSecret(vchSecret.GetSecret()); + bool fCompressed; + CSecret secret = vchSecret.GetSecret(fCompressed); + key.SetSecret(secret, fCompressed); CBitcoinAddress vchAddress = CBitcoinAddress(key.GetPubKey()); CRITICAL_BLOCK(cs_main) @@ -95,7 +97,8 @@ Value dumpprivkey(const Array& params, bool fHelp) if (!address.SetString(strAddress)) throw JSONRPCError(-5, "Invalid bitcoin address"); CSecret vchSecret; - if (!pwalletMain->GetSecret(address, vchSecret)) + bool fCompressed; + if (!pwalletMain->GetSecret(address, vchSecret, fCompressed)) throw JSONRPCError(-4,"Private key for address " + strAddress + " is not known"); - return CBitcoinSecret(vchSecret).ToString(); + return CBitcoinSecret(vchSecret, fCompressed).ToString(); }