snowtest

package
v1.11.12-rc.13 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	XChainID    = ids.GenerateTestID()
	CChainID    = ids.GenerateTestID()
	PChainID    = constants.PlatformChainID
	AVAXAssetID = ids.GenerateTestID()
)
View Source
var (
	ErrInvalidStateTransition = errors.New("invalid state transition")
)

Functions

func ConsensusContext

func ConsensusContext(ctx *snow.Context) *snow.ConsensusContext

func Context

func Context(tb testing.TB, chainID ids.ID) *snow.Context

Types

type Decidable

type Decidable struct {
	IDV     ids.ID
	AcceptV error
	RejectV error
	Status  Status
}

func (*Decidable) Accept

func (d *Decidable) Accept(context.Context) error

func (*Decidable) ID

func (d *Decidable) ID() ids.ID

func (*Decidable) Reject

func (d *Decidable) Reject(context.Context) error

type Status

type Status int
const (
	Undecided Status = iota
	Accepted
	Rejected
)

Undecided means the operation hasn't been decided yet Accepted means the operation was accepted Rejected means the operation will never be accepted

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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