sweep: allow specifying starting fee rate for fee func

This commit is contained in:
yyforyongyu committed 2024-04-19 21:33:37 +08:00
1 parent db3aad31aa
commit b6a2984167
8 files changed
+140 -20

No files matched your search

+8
View File
@@ -8,6 +8,7 @@ import (
"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"
@@ -510,6 +511,13 @@ func (m *MockInputSet) Budget() btcutil.Amount {
return args.Get(0).(btcutil.Amount)
}
// StartingFeeRate returns the max starting fee rate found in the inputs.
func (m *MockInputSet) StartingFeeRate() fn.Option[chainfee.SatPerKWeight] {
args := m.Called()
return args.Get(0).(fn.Option[chainfee.SatPerKWeight])
}
// MockBumper is a mock implementation of the interface Bumper.
type MockBumper struct {
mock.Mock