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 committed 2024-12-20 17:53:59 +08:00
1 parent 5f64280df4
commit d0c7fd8aac
5 files changed
+36

No files matched your search

+2
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.