multi: return more information in list of leased outputs

With this commit we return the additional information the wallet now
provides about locked/leased outputs.
This commit is contained in:
Oliver Gugger
2022-05-12 10:24:40 +02:00
parent a25d5255fb
commit 70103a1838
5 changed files with 59 additions and 29 deletions

View File

@@ -13,6 +13,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcwallet/waddrmgr"
base "github.com/btcsuite/btcwallet/wallet"
"github.com/btcsuite/btcwallet/wallet/txauthor"
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/lightningnetwork/lnd/lnwallet"
@@ -174,9 +175,9 @@ func (w *WalletController) UnlockOutpoint(o wire.OutPoint) {}
// LeaseOutput returns the current time and a nil error.
func (w *WalletController) LeaseOutput(wtxmgr.LockID, wire.OutPoint,
time.Duration) (time.Time, error) {
time.Duration) (time.Time, []byte, btcutil.Amount, error) {
return time.Now(), nil
return time.Now(), nil, 0, nil
}
// ReleaseOutput currently does nothing.
@@ -184,7 +185,9 @@ func (w *WalletController) ReleaseOutput(wtxmgr.LockID, wire.OutPoint) error {
return nil
}
func (w *WalletController) ListLeasedOutputs() ([]*wtxmgr.LockedOutput, error) {
func (w *WalletController) ListLeasedOutputs() ([]*base.ListLeasedOutputResult,
error) {
return nil, nil
}