sweep: allow specifying starting fee rate for fee func

This commit is contained in:
yyforyongyu
2024-04-11 17:08:36 +08:00
parent db3aad31aa
commit b6a2984167
8 changed files with 140 additions and 20 deletions

View File

@@ -2734,9 +2734,13 @@ func TestSweepPendingInputs(t *testing.T) {
setNeedWallet.On("Inputs").Return(nil).Times(4)
setNeedWallet.On("DeadlineHeight").Return(testHeight).Once()
setNeedWallet.On("Budget").Return(btcutil.Amount(1)).Once()
setNeedWallet.On("StartingFeeRate").Return(
fn.None[chainfee.SatPerKWeight]()).Once()
normalSet.On("Inputs").Return(nil).Times(4)
normalSet.On("DeadlineHeight").Return(testHeight).Once()
normalSet.On("Budget").Return(btcutil.Amount(1)).Once()
normalSet.On("StartingFeeRate").Return(
fn.None[chainfee.SatPerKWeight]()).Once()
// Make pending inputs for testing. We don't need real values here as
// the returned clusters are mocked.