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

testcontext

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 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
	NetID        ids.ID
	ChainID      ids.ID
	NodeID       ids.NodeID
	XChainID     ids.ID
	CChainID     ids.ID
	LUXAssetID   ids.ID
	Log          log.Logger
	Lock         *sync.RWMutex
	SharedMemory atomic.SharedMemory
	BCLookup     ids.AliaserReader
}

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 consensus.IDs) *Context

WithIDs sets the IDs from consensus.IDs

Jump to

Keyboard shortcuts

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