mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-12 04:30:04 +00:00
77d3ccb9ad
* Clean up state types * rename package
19 lines
441 B
Go
19 lines
441 B
Go
// Package testing includes useful mocks for slot tickers in unit tests.
|
|
package testing
|
|
|
|
import "github.com/prysmaticlabs/prysm/v3/consensus-types/primitives"
|
|
|
|
// MockTicker defines a useful struct for mocking the Ticker interface
|
|
// from the slotutil package.
|
|
type MockTicker struct {
|
|
Channel chan primitives.Slot
|
|
}
|
|
|
|
// C --
|
|
func (m *MockTicker) C() <-chan primitives.Slot {
|
|
return m.Channel
|
|
}
|
|
|
|
// Done --
|
|
func (_ *MockTicker) Done() {}
|