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 {
|
||||
@ -144,6 +145,8 @@ func initSwitchWithDB(startingHeight uint32, db *channeldb.DB) (*Switch, error)
|
||||
return nil, nil
|
||||
},
|
||||
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