mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
37 lines
773 B
Go
37 lines
773 B
Go
package p2p
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/OffchainLabs/prysm/v7/beacon-chain/forkchoice"
|
|
"github.com/OffchainLabs/prysm/v7/consensus-types/primitives"
|
|
ethpb "github.com/OffchainLabs/prysm/v7/proto/prysm/v1alpha1"
|
|
"github.com/OffchainLabs/prysm/v7/time/slots"
|
|
)
|
|
|
|
type mockChain struct {
|
|
currentFork *ethpb.Fork
|
|
genesisValsRoot [32]byte
|
|
genesisTime time.Time
|
|
}
|
|
|
|
func (m *mockChain) ForkChoicer() forkchoice.ForkChoicer {
|
|
return nil
|
|
}
|
|
|
|
func (m *mockChain) CurrentFork() *ethpb.Fork {
|
|
return m.currentFork
|
|
}
|
|
|
|
func (m *mockChain) GenesisValidatorsRoot() [32]byte {
|
|
return m.genesisValsRoot
|
|
}
|
|
|
|
func (m *mockChain) GenesisTime() time.Time {
|
|
return m.genesisTime
|
|
}
|
|
|
|
func (m *mockChain) CurrentSlot() primitives.Slot {
|
|
return slots.CurrentSlot(m.genesisTime)
|
|
}
|