sweep: add new interface method Immediate

This prepares the following commit where we now let the fee bumpr
decides whether to broadcast immediately or not.
This commit is contained in:
yyforyongyu
2024-10-25 15:32:30 +08:00
parent 5f64280df4
commit d0c7fd8aac
5 changed files with 36 additions and 0 deletions

View File

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