lnwallet: add derivation and prev TX to UTXO

This commit is contained in:
Oliver Gugger committed 2022-01-06 13:24:31 +01:00
1 parent 167a1f2b79
commit b54279dd87
2 files changed
+7 -1

No files matched your search

+5 -1
View File
@@ -24,7 +24,9 @@ import (
// //
// This is a part of the WalletController interface. // This is a part of the WalletController interface.
func (b *BtcWallet) FetchInputInfo(prevOut *wire.OutPoint) (*lnwallet.Utxo, error) { func (b *BtcWallet) FetchInputInfo(prevOut *wire.OutPoint) (*lnwallet.Utxo, error) {
_, txOut, _, confirmations, err := b.wallet.FetchInputInfo(prevOut) prevTx, txOut, bip32, confirmations, err := b.wallet.FetchInputInfo(
prevOut,
)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@@ -44,6 +46,8 @@ func (b *BtcWallet) FetchInputInfo(prevOut *wire.OutPoint) (*lnwallet.Utxo, erro
PkScript: txOut.PkScript, PkScript: txOut.PkScript,
Confirmations: confirmations, Confirmations: confirmations,
OutPoint: *prevOut, OutPoint: *prevOut,
Derivation: bip32,
PrevTx: prevTx,
}, nil }, nil
} }
+2
View File
@@ -78,6 +78,8 @@ type Utxo struct {
Confirmations int64 Confirmations int64
PkScript []byte PkScript []byte
wire.OutPoint wire.OutPoint
Derivation *psbt.Bip32Derivation
PrevTx *wire.MsgTx
} }
// TransactionDetail describes a transaction with either inputs which belong to // TransactionDetail describes a transaction with either inputs which belong to