mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-04 12:54:07 +02:00
lnwallet+lntest: add FetchOutpointInfo
and FetchDerivationInfo
This commit is contained in:
@@ -61,6 +61,22 @@ func (w *mockWalletController) FetchInputInfo(
|
||||
return utxo, nil
|
||||
}
|
||||
|
||||
// FetchOutpointInfo will be called to get info about the inputs to the funding
|
||||
// transaction.
|
||||
func (w *mockWalletController) FetchOutpointInfo(
|
||||
prevOut *wire.OutPoint) (*Utxo, error) {
|
||||
|
||||
utxo := &Utxo{
|
||||
AddressType: WitnessPubKey,
|
||||
Value: 10 * btcutil.SatoshiPerBitcoin,
|
||||
PkScript: []byte("dummy"),
|
||||
Confirmations: 1,
|
||||
OutPoint: *prevOut,
|
||||
}
|
||||
|
||||
return utxo, nil
|
||||
}
|
||||
|
||||
// ScriptForOutput returns the address, witness program and redeem script for a
|
||||
// given UTXO. An error is returned if the UTXO does not belong to our wallet or
|
||||
// it is not a managed pubKey address.
|
||||
@@ -300,6 +316,14 @@ func (w *mockWalletController) RemoveDescendants(*wire.MsgTx) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// FetchDerivationInfo queries for the wallet's knowledge of the passed
|
||||
// pkScript and constructs the derivation info and returns it.
|
||||
func (w *mockWalletController) FetchDerivationInfo(
|
||||
pkScript []byte) (*psbt.Bip32Derivation, error) {
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (w *mockWalletController) CheckMempoolAcceptance(tx *wire.MsgTx) error {
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user