avalanche

package
v1.11.6-stella Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestVertex

type TestVertex struct {
	choices.TestDecidable

	ParentsV    []Vertex
	ParentsErrV error
	HeightV     uint64
	HeightErrV  error
	TxsV        []snowstorm.Tx
	TxsErrV     error
	BytesV      []byte
}

TestVertex is a useful test vertex

func (*TestVertex) Bytes

func (v *TestVertex) Bytes() []byte

func (*TestVertex) Height

func (v *TestVertex) Height() (uint64, error)

func (*TestVertex) Parents

func (v *TestVertex) Parents() ([]Vertex, error)

func (*TestVertex) Txs

func (v *TestVertex) Txs(context.Context) ([]snowstorm.Tx, error)

type Vertex

type Vertex interface {
	choices.Decidable

	// Returns the vertices this vertex depends on
	Parents() ([]Vertex, error)

	// Returns the height of this vertex. A vertex's height is defined by one
	// greater than the maximum height of the parents.
	Height() (uint64, error)

	// Returns a series of state transitions to be performed on acceptance
	Txs(context.Context) ([]snowstorm.Tx, error)

	// Returns the binary representation of this vertex
	Bytes() []byte
}

Vertex is a collection of multiple transactions tied to other vertices

Note: Verify is not part of this interface because bootstrapping uses IDs to verify the vertex is valid.

Jump to

Keyboard shortcuts

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