diff options
author | Ben Woosley <ben.woosley@gmail.com> | 2018-05-17 17:54:18 -0700 |
---|---|---|
committer | Ben Woosley <ben.woosley@gmail.com> | 2018-05-18 11:08:13 -0700 |
commit | 6aa33feadbe11bfa505a80a691d84db966aca134 (patch) | |
tree | 0281e621d6958cbb645b5bfa498092687e2492c6 /src/rpc | |
parent | 1b53e4f67c6dbefadbfda7e40948840fe2b9da48 (diff) |
Drop UpdateTransaction in favor of UpdateInput
Updating the input explicitly requires the caller to present a mutable
input, which more clearly communicates the effects and intent of the method.
In most cases, this input is already immediately available and need not be
looked up.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index c5185ca599..7d8c8793a0 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -748,7 +748,7 @@ static UniValue combinerawtransaction(const JSONRPCRequest& request) } } - UpdateTransaction(mergedTx, i, sigdata); + UpdateInput(txin, sigdata); } return EncodeHexTx(mergedTx); @@ -882,7 +882,7 @@ UniValue SignTransaction(CMutableTransaction& mtx, const UniValue& prevTxsUnival } sigdata = CombineSignatures(prevPubKey, TransactionSignatureChecker(&txConst, i, amount), sigdata, DataFromTransaction(mtx, i)); - UpdateTransaction(mtx, i, sigdata); + UpdateInput(txin, sigdata); ScriptError serror = SCRIPT_ERR_OK; if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, TransactionSignatureChecker(&txConst, i, amount), &serror)) { |