mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
2d75b12791
* initial implementation * register metadata provider * final implementation * tests * fixed imports * gazelle * code review * small cleanup * change errors.Wrap to status.Errorf * gazelle + goimports Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
19 lines
411 B
Go
19 lines
411 B
Go
package testing
|
|
|
|
import pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
|
|
// MockMetadataProvider is a fake implementation of the MetadataProvider interface.
|
|
type MockMetadataProvider struct {
|
|
Data *pb.MetaData
|
|
}
|
|
|
|
// Metadata --
|
|
func (m *MockMetadataProvider) Metadata() *pb.MetaData {
|
|
return m.Data
|
|
}
|
|
|
|
// MetadataSeq --
|
|
func (m *MockMetadataProvider) MetadataSeq() uint64 {
|
|
return m.Data.SeqNumber
|
|
}
|