snowtest

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: 4 Imported by: 0

Documentation

Overview

Package snowtest provides test utilities for snow consensus

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsensusContext

func ConsensusContext(t testing.TB) *snow.Context

ConsensusContext returns a test consensus context

func Context

func Context() *snow.Context

Context returns a test context

Types

type TestState

type TestState struct {
	// contains filtered or unexported fields
}

TestState is a test implementation of validators.State

func (*TestState) GetValidatorSet

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

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

type Validator

type Validator struct {
	NodeID ids.NodeID
	Weight uint64
}

Validator creates a test validator

Jump to

Keyboard shortcuts

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