aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpcwallet.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-11-30 14:50:20 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2016-12-02 18:28:22 -0800
commit42fd8dee302fec55ba0970e2f1378edc2797e4ff (patch)
tree0b2b5cb6be13f876f5b0fc6060da144213cda6bc /src/wallet/rpcwallet.cpp
parentc3f5673a6304e3ea9fa56fff66b6ea1cb73cc98f (diff)
downloadbitcoin-42fd8dee302fec55ba0970e2f1378edc2797e4ff.tar.xz
Make DecodeHexTx return a CMutableTransaction
Diffstat (limited to 'src/wallet/rpcwallet.cpp')
-rw-r--r--src/wallet/rpcwallet.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index f31a28c4d2..9e32b6751d 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2557,17 +2557,16 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
}
// parse hex string from parameter
- CTransaction origTx;
- if (!DecodeHexTx(origTx, request.params[0].get_str(), true))
+ CMutableTransaction tx;
+ if (!DecodeHexTx(tx, request.params[0].get_str(), true))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
- if (origTx.vout.size() == 0)
+ if (tx.vout.size() == 0)
throw JSONRPCError(RPC_INVALID_PARAMETER, "TX must have at least one output");
- if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > origTx.vout.size()))
+ if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > tx.vout.size()))
throw JSONRPCError(RPC_INVALID_PARAMETER, "changePosition out of bounds");
- CMutableTransaction tx(origTx);
CAmount nFeeOut;
string strFailReason;