mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-11 04:02:46 +02:00
lnwallet: add derivation and prev TX to UTXO
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user