mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Update SignPSBTInput for PSBTv2
This commit is contained in:
parent
0cfc3ed8ad
commit
27da84b84b
1 changed files with 2 additions and 2 deletions
|
@ -498,7 +498,7 @@ PrecomputedTransactionData PrecomputePSBTData(const PartiallySignedTransaction&
|
|||
bool SignPSBTInput(const SigningProvider& provider, PartiallySignedTransaction& psbt, int index, const PrecomputedTransactionData* txdata, int sighash, SignatureData* out_sigdata, bool finalize)
|
||||
{
|
||||
PSBTInput& input = psbt.inputs.at(index);
|
||||
const CMutableTransaction& tx = *psbt.tx;
|
||||
const CMutableTransaction& tx = psbt.GetUnsignedTx();
|
||||
|
||||
if (PSBTInputSignedAndVerified(psbt, index, txdata)) {
|
||||
return true;
|
||||
|
@ -514,7 +514,7 @@ bool SignPSBTInput(const SigningProvider& provider, PartiallySignedTransaction&
|
|||
|
||||
if (input.non_witness_utxo) {
|
||||
// If we're taking our information from a non-witness UTXO, verify that it matches the prevout.
|
||||
COutPoint prevout = tx.vin[index].prevout;
|
||||
COutPoint prevout = input.GetOutPoint();
|
||||
if (prevout.n >= input.non_witness_utxo->vout.size()) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue