prysm-pulse/beacon-chain/p2p/testing/mock_metadataprovider.go
Nishant Das 91bd477f4f
Add Metadata V2 Object and Interface (#8962)
* checkpoint changes

* gaz

* add error check

* gaz

* fix tests

* fix tests

* terence's review

* terence's review

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-06-02 13:44:34 +08:00

21 lines
432 B
Go

package testing
import (
"github.com/prysmaticlabs/prysm/shared/interfaces"
)
// MockMetadataProvider is a fake implementation of the MetadataProvider interface.
type MockMetadataProvider struct {
Data interfaces.Metadata
}
// Metadata --
func (m *MockMetadataProvider) Metadata() interfaces.Metadata {
return m.Data
}
// MetadataSeq --
func (m *MockMetadataProvider) MetadataSeq() uint64 {
return m.Data.SequenceNumber()
}