Update License in File Headers
[novacoin.git] / src / rpcdump.cpp
index c7c5b1d..ae7f1cd 100644 (file)
@@ -1,8 +1,6 @@
-// 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.
-
-#include <stdint.h>
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
 
 #include "headers.h"
 #include "init.h" // for pwalletMain
@@ -33,7 +31,7 @@ class CTxDump
 {
 public:
     CBlockIndex *pindex;
-    int64_t nValue;
+    int64 nValue;
     bool fSpent;
     CWalletTx* ptx;
     int nOut;
@@ -64,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)
@@ -97,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();
 }