2021-01-14 20:48:40 +00:00
|
|
|
package testing
|
|
|
|
|
2021-06-02 05:44:34 +00:00
|
|
|
import (
|
2021-07-23 13:07:40 +00:00
|
|
|
"github.com/prysmaticlabs/prysm/proto/interfaces"
|
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 13:07:40 +00:00
|
|
|
Data interfaces.Metadata
|
2021-01-14 20:48:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Metadata --
|
2021-07-23 13:07:40 +00:00
|
|
|
func (m *MockMetadataProvider) Metadata() interfaces.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
|
|
|
}
|