diff options
author | Glenn Willen <gwillen@nerdnet.org> | 2018-10-26 15:30:50 -0700 |
---|---|---|
committer | Glenn Willen <gwillen@nerdnet.org> | 2018-11-01 12:11:24 -0700 |
commit | 0f5bda2bd941686620ef0eb90bd7ed973cc7ef73 (patch) | |
tree | 2d2d1a663698380947e6c83a335d9e9c1dc4a34e /src/rpc/rawtransaction.cpp | |
parent | 53e6fffb8f5b10f94708d33d667a67cb91c2d09d (diff) |
Simplify arguments to SignPSBTInput
Remove redundant arguments to SignPSBTInput -- since it needs several
bits of the PartiallySignedTransaction, pass in a reference instead of
doing it piecemeal. This saves us having to pass in both a PSBTInput and
its index, as well as having to pass in the CTransaction. Also avoid
redundantly passing the sighash_type, which is contained in the
PSBTInput already.
Diffstat (limited to 'src/rpc/rawtransaction.cpp')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index a6e94d54d4..f169f09174 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1542,9 +1542,7 @@ UniValue finalizepsbt(const JSONRPCRequest& request) // script. bool complete = true; for (unsigned int i = 0; i < psbtx.tx->vin.size(); ++i) { - PSBTInput& input = psbtx.inputs.at(i); - - complete &= SignPSBTInput(DUMMY_SIGNING_PROVIDER, *psbtx.tx, input, i, SIGHASH_ALL); + complete &= SignPSBTInput(DUMMY_SIGNING_PROVIDER, psbtx, i, SIGHASH_ALL); } UniValue result(UniValue::VOBJ); |