Help us shape the future of Go! Take the 2026 Go Developer Survey

verify

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSameChainID         = errors.New("same chainID")
	ErrMismatchedSubnetIDs = errors.New("mismatched subnetIDs")
)

Functions

func All

func All(verifiables ...Verifiable) error

All returns nil if all the verifiables were verified with no errors

func SameSubnet added in v0.1.1

func SameSubnet(ctx context.Context, chainCtx *core.Context, peerChainID ids.ID) error

SameSubnet verifies that the provided [ctx] was provided to a chain in the same subnet as [peerChainID], but not the same chain. If this verification fails, a non-nil error will be returned.

Types

type ContextInitializable added in v0.1.1

type ContextInitializable interface {
	// Initialize initializes the state with the given context
	Initialize(ctx interface{}) error
}

ContextInitializable defines the interface for context initialization

type IsNotState added in v0.1.1

type IsNotState interface {
	// contains filtered or unexported methods
}

type IsState added in v0.1.1

type IsState interface {
	// contains filtered or unexported methods
}

type State added in v0.1.1

type State interface {
	ContextInitializable
	Verifiable
	IsState
	// InitCtx initializes the state with consensus context
	InitCtx(ctx interface{})
}

type Verifiable

type Verifiable interface {
	Verify() error
}

Directories

Path Synopsis
Package verifymock is a generated GoMock package.
Package verifymock is a generated GoMock package.

Jump to

Keyboard shortcuts

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