testcontext

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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