mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
b577869ed6
* Fixes import aliases * another fix * reset gw files Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
19 lines
412 B
Go
19 lines
412 B
Go
// Package testing includes useful mocks for slot tickers in unit tests.
|
|
package testing
|
|
|
|
import types "github.com/prysmaticlabs/eth2-types"
|
|
|
|
// MockTicker defines a useful struct for mocking the Ticker interface
|
|
// from the slotutil package.
|
|
type MockTicker struct {
|
|
Channel chan types.Slot
|
|
}
|
|
|
|
// C --
|
|
func (m *MockTicker) C() <-chan types.Slot {
|
|
return m.Channel
|
|
}
|
|
|
|
// Done --
|
|
func (m *MockTicker) Done() {}
|