2021-01-14 20:48:40 +00:00
|
|
|
package testing
|
|
|
|
|
2021-06-02 05:44:34 +00:00
|
|
|
import (
|
2023-03-17 18:52:56 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v4/proto/prysm/v1alpha1/metadata"
|
2021-06-02 05:44:34 +00:00
|
|
|
)
|
2021-01-14 20:48:40 +00:00
|
|
|
|
|
|
|
// MockMetadataProvider is a fake implementation of the MetadataProvider interface.
|
|
|
|
type MockMetadataProvider struct {
|
2021-07-23 20:10:15 +00:00
|
|
|
Data metadata.Metadata
|
2021-01-14 20:48:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Metadata --
|
2021-07-23 20:10:15 +00:00
|
|
|
func (m *MockMetadataProvider) Metadata() metadata.Metadata {
|
2021-01-14 20:48:40 +00:00
|
|
|
return m.Data
|
|
|
|
}
|
|
|
|
|
|
|
|
// MetadataSeq --
|
|
|
|
func (m *MockMetadataProvider) MetadataSeq() uint64 {
|
2021-06-02 05:44:34 +00:00
|
|
|
return m.Data.SequenceNumber()
|
2021-01-14 20:48:40 +00:00
|
|
|
}
|