Documentation ¶
Index ¶
- func Run(t *testing.T, config string, fork int)
- type Builder
- func (bb *Builder) Attestation(t testing.TB, a *ethpb.Attestation)
- func (bb *Builder) AttesterSlashing(s *ethpb.AttesterSlashing)
- func (bb *Builder) Check(t testing.TB, c *Check)
- func (bb *Builder) InvalidBlock(t testing.TB, b interfaces.SignedBeaconBlock)
- func (bb *Builder) PoWBlock(pb *ethpb.PowBlock)
- func (bb *Builder) Tick(t testing.TB, tick int64)
- func (bb *Builder) ValidBlock(t testing.TB, b interfaces.SignedBeaconBlock)
- type Check
- type EpochRoot
- type SlotRoot
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilder(t testing.TB, initialState state.BeaconState, initialBlock interfaces.SignedBeaconBlock) *Builder
func (*Builder) Attestation ¶
func (bb *Builder) Attestation(t testing.TB, a *ethpb.Attestation)
Attestation receives the attestation and updates forkchoice.
func (*Builder) AttesterSlashing ¶
func (bb *Builder) AttesterSlashing(s *ethpb.AttesterSlashing)
AttesterSlashing receives an attester slashing and feeds it to forkchoice.
func (*Builder) Check ¶
Check evaluates the fork choice results and compares them to the expected values.
func (*Builder) InvalidBlock ¶
func (bb *Builder) InvalidBlock(t testing.TB, b interfaces.SignedBeaconBlock)
InvalidBlock receives the invalid block and notifies forkchoice.
func (*Builder) Tick ¶
Tick resets the genesis time to now()-tick and adjusts the slot to the appropriate value.
func (*Builder) ValidBlock ¶
func (bb *Builder) ValidBlock(t testing.TB, b interfaces.SignedBeaconBlock)
ValidBlock receives the valid block and notifies forkchoice.
type Check ¶
type Check struct { Time *int `json:"time"` GenesisTime int `json:"genesis_time"` ProposerBoostRoot *string `json:"proposer_boost_root"` Head *SlotRoot `json:"head"` JustifiedCheckPoint *EpochRoot `json:"justified_checkpoint"` BestJustifiedCheckPoint *EpochRoot `json:"best_justified_checkpoint"` FinalizedCheckPoint *EpochRoot `json:"finalized_checkpoint"` }
Click to show internal directories.
Click to hide internal directories.