From 427702dbe6a1efd7e8a4c124f6817b899933fe92 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Fri, 10 Jun 2022 20:12:54 +0200 Subject: [PATCH] rpcwallet: use PSBT prev out fetcher --- lnwallet/rpcwallet/rpcwallet.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lnwallet/rpcwallet/rpcwallet.go b/lnwallet/rpcwallet/rpcwallet.go index de47a0759..cb7467752 100644 --- a/lnwallet/rpcwallet/rpcwallet.go +++ b/lnwallet/rpcwallet/rpcwallet.go @@ -259,7 +259,8 @@ func (r *RPCKeyRing) FinalizePsbt(packet *psbt.Packet, _ string) error { // ones to sign. If there is any input without witness data that we // cannot sign because it's not our UTXO, this will be a hard failure. tx := packet.UnsignedTx - sigHashes := input.NewTxSigHashesV0Only(tx) + prevOutFetcher := basewallet.PsbtPrevOutputFetcher(packet) + sigHashes := txscript.NewTxSigHashes(tx, prevOutFetcher) for idx, txIn := range tx.TxIn { in := packet.Inputs[idx]