mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
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.
Github-Pull: #14588
Rebased-From: 0f5bda2bd9
This commit is contained in:
committed by
Pieter Wuille
parent
39ece4fc28
commit
ad94165db9
@@ -238,8 +238,11 @@ bool PSBTInputSigned(PSBTInput& input)
|
||||
return !input.final_script_sig.empty() || !input.final_script_witness.IsNull();
|
||||
}
|
||||
|
||||
bool SignPSBTInput(const SigningProvider& provider, const CMutableTransaction& tx, PSBTInput& input, SignatureData& sigdata, int index, int sighash)
|
||||
bool SignPSBTInput(const SigningProvider& provider, PartiallySignedTransaction& psbt, SignatureData& sigdata, int index, int sighash)
|
||||
{
|
||||
PSBTInput& input = psbt.inputs.at(index);
|
||||
const CMutableTransaction& tx = *psbt.tx;
|
||||
|
||||
if (PSBTInputSigned(input)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user