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

testcontext

package
v1.22.82 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package testcontext provides a test context for platformvm tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	context.Context
	NetworkID      uint32 // 1=mainnet, 2=testnet
	ChainID        ids.ID
	NodeID         ids.NodeID
	PublicKey      interface{} // BLS public key
	XChainID       ids.ID
	CChainID       ids.ID
	DChainID       ids.ID
	XAssetID       ids.ID // Primary asset ID (X-chain native)
	ValidatorState interface{}
	WarpSigner     interface{}
	Log            log.Logger
	Lock           *sync.RWMutex
	SharedMemory   atomic.SharedMemory
	BCLookup       ids.AliaserReader
	ChainDataDir   string
	Keystore       interface{}
	Signer         interface{}
}

Context provides a test context that mimics the old context.Context for compatibility with existing tests

func New

func New(ctx context.Context) *Context

New creates a new test context

func (*Context) WithIDs

func (c *Context) WithIDs(ids consensuscontext.IDs) *Context

WithIDs sets the IDs from consensuscontext.IDs

Jump to

Keyboard shortcuts

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