validatorstest

package
v1.0.0-genesis Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package validatorstest provides test utilities for validators

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestState

type TestState struct {
	T testing.TB
	// contains filtered or unexported fields
}

TestState is a test implementation of validators.State

func NewTestState

func NewTestState(t testing.TB) *TestState

NewTestState creates a new test state

func (*TestState) GetValidatorSet

func (ts *TestState) GetValidatorSet(pChainHeight uint64, subnetID ids.ID) (map[ids.NodeID]*validators.Validator, error)

GetValidatorSet returns the validator set for the given subnet at the given height

func (*TestState) SetValidator

func (ts *TestState) SetValidator(pChainHeight uint64, subnetID ids.ID, nodeID ids.NodeID, weight uint64) error

SetValidator sets a validator for the given subnet

Jump to

Keyboard shortcuts

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