diff options
Diffstat (limited to 'src/rpcrawtransaction.cpp')
| -rw-r--r-- | src/rpcrawtransaction.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index fb9811b92..f08688d38 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -9,7 +9,6 @@ #include "bitcoinrpc.h" #include "db.h" #include "init.h" -#include "main.h" #include "net.h" #include "wallet.h" @@ -407,10 +406,7 @@ Value signrawtransaction(const Array& params, bool fHelp) bool fGood = vchSecret.SetString(k.get_str()); if (!fGood) throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key"); - CKey key; - bool fCompressed; - CSecret secret = vchSecret.GetSecret(fCompressed); - key.SetSecret(secret, fCompressed); + CKey key = vchSecret.GetKey(); tempKeystore.AddKey(key); } } @@ -558,7 +554,7 @@ Value sendrawtransaction(const Array& params, bool fHelp) if (!fHave) { // push to local node CValidationState state; - if (!tx.AcceptToMemoryPool(state, true, false)) + if (!mempool.accept(state, tx, false, NULL)) throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX rejected"); // TODO: report validation state } } |