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