rpcwallet: pass prev output fetcher into ComputeInputScript

This commit fixes signing of Taproot inputs when some of the other
inputs of the transaction are not known to the wallet (such as a Pool
account for example).
If we want to sign for a Taproot (change) input when depositing into a
Pool account the wallet won't know the Pool account input. So we need to
make sure we pass it along inside the PrevOutputFetcher (which contains
the UTXO information extracted from the PSBT).
This commit is contained in:
Oliver Gugger committed 2022-11-11 10:20:09 +01:00
1 parent ed2e542515
commit 5bd3e91750
1 file changed
+4 -3
+4 -3
View File
@@ -293,9 +293,10 @@ func (r *RPCKeyRing) FinalizePsbt(packet *psbt.Packet, _ string) error {
Value: int64(utxo.Value),
PkScript: utxo.PkScript,
},
HashType: in.SighashType,
SigHashes: sigHashes,
InputIndex: idx,
HashType: in.SighashType,
SigHashes: sigHashes,
InputIndex: idx,
PrevOutputFetcher: prevOutFetcher,
}
// Find out what UTXO we are signing. Wallets _should_ always