2021-01-14 20:48:40 +00:00
|
|
|
package testing
|
|
|
|
|
2021-06-02 05:44:34 +00:00
|
|
|
import (
|
2022-08-16 12:20:13 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/v3/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
|
|
|
}
|