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.ReadOnlySignedBeaconBlock)
- func (bb *Builder) PoWBlock(pb *ethpb.PowBlock)
- func (bb *Builder) SetPayloadStatus(resp *MockEngineResp) error
- func (bb *Builder) Tick(t testing.TB, tick int64)
- func (bb *Builder) ValidBlock(t testing.TB, b interfaces.ReadOnlySignedBeaconBlock)
- type Check
- type EpochRoot
- type MockEngineResp
- 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.ReadOnlySignedBeaconBlock) *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.ReadOnlySignedBeaconBlock)
InvalidBlock receives the invalid block and notifies forkchoice.
func (*Builder) SetPayloadStatus ¶ added in v3.1.2
func (bb *Builder) SetPayloadStatus(resp *MockEngineResp) error
SetPayloadStatus sets the payload status that the engine will return
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.ReadOnlySignedBeaconBlock)
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"` }
type MockEngineResp ¶ added in v3.1.2
type Step ¶
type Step struct { Tick *int `json:"tick"` Block *string `json:"block"` Valid *bool `json:"valid"` Attestation *string `json:"attestation"` AttesterSlashing *string `json:"attester_slashing"` PayloadStatus *MockEngineResp `json:"payload_status"` PowBlock *string `json:"pow_block"` Check *Check `json:"checks"` }
Click to show internal directories.
Click to hide internal directories.