htlcswitch/mock: remove mockTicker, use ticker.MockNew
This commit is contained in:
parent
2651136806
commit
6a709526d8
@ -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() {
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user