diff --git a/htlcswitch/mock.go b/htlcswitch/mock.go index 9d3a2938..20472b6a 100644 --- a/htlcswitch/mock.go +++ b/htlcswitch/mock.go @@ -26,6 +26,7 @@ import ( "github.com/lightningnetwork/lnd/lnpeer" "github.com/lightningnetwork/lnd/lnwallet" "github.com/lightningnetwork/lnd/lnwire" + "github.com/lightningnetwork/lnd/ticker" ) type mockPreimageCache struct { @@ -143,7 +144,9 @@ func initSwitchWithDB(startingHeight uint32, db *channeldb.DB) (*Switch, error) FetchLastChannelUpdate: func(lnwire.ShortChannelID) (*lnwire.ChannelUpdate, error) { return nil, nil }, - Notifier: &mockNotifier{}, + Notifier: &mockNotifier{}, + FwdEventTicker: ticker.MockNew(DefaultFwdEventInterval), + LogEventTicker: ticker.MockNew(DefaultLogInterval), } return New(cfg, startingHeight) @@ -807,14 +810,3 @@ func (m *mockNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint, _ []byte, Spend: make(chan *chainntnfs.SpendDetail), }, nil } - -type mockTicker struct { - ticker <-chan time.Time -} - -func (m *mockTicker) Start() <-chan time.Time { - return m.ticker -} - -func (m *mockTicker) Stop() { -}