sweep: expand InputSet with more interface methods

This commit adds more interface methods to `InputSet` to prepare the
addition of budget-based aggregator.
This commit is contained in:
yyforyongyu
2024-01-17 00:25:41 +08:00
parent d0a8f27d84
commit db7eae97ff
2 changed files with 49 additions and 0 deletions

View File

@ -5,8 +5,10 @@ import (
"testing"
"time"
"github.com/btcsuite/btcd/btcutil"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/lightningnetwork/lnd/fn"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
@ -446,3 +448,17 @@ func (m *MockInputSet) NeedWalletInput() bool {
return args.Bool(0)
}
// DeadlineHeight returns the deadline height for the set.
func (m *MockInputSet) DeadlineHeight() fn.Option[int32] {
args := m.Called()
return args.Get(0).(fn.Option[int32])
}
// Budget givens the total amount that can be used as fees by this input set.
func (m *MockInputSet) Budget() btcutil.Amount {
args := m.Called()
return args.Get(0).(btcutil.Amount)
}