validatorstest

package
v1.11.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2024 License: BSD-3-Clause Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	T testing.TB

	CantGetMinimumHeight,
	CantGetCurrentHeight,
	CantGetSubnetID,
	CantGetValidatorSet bool

	GetMinimumHeightF func(ctx context.Context) (uint64, error)
	GetCurrentHeightF func(ctx context.Context) (uint64, error)
	GetSubnetIDF      func(ctx context.Context, chainID ids.ID) (ids.ID, error)
	GetValidatorSetF  func(ctx context.Context, height uint64, subnetID ids.ID) (map[ids.NodeID]*validators.GetValidatorOutput, error)
}

func (*State) GetCurrentHeight

func (vm *State) GetCurrentHeight(ctx context.Context) (uint64, error)

func (*State) GetMinimumHeight

func (vm *State) GetMinimumHeight(ctx context.Context) (uint64, error)

func (*State) GetSubnetID

func (vm *State) GetSubnetID(ctx context.Context, chainID ids.ID) (ids.ID, error)

func (*State) GetValidatorSet

func (vm *State) GetValidatorSet(
	ctx context.Context,
	height uint64,
	subnetID ids.ID,
) (map[ids.NodeID]*validators.GetValidatorOutput, error)

type TestState deprecated

type TestState = State

TestState is an alias for State because CaiJiJi/coreth uses the original identifier and this change would otherwise break the build.

Deprecated: use State.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL