avalanche

package
v1.10.17-rc.19 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: BSD-3-Clause Imports: 3 Imported by: 44

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestVertex added in v0.8.0

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 added in v0.8.0

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

func (*TestVertex) Height added in v0.8.0

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

func (*TestVertex) Parents added in v0.8.0

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

func (*TestVertex) Txs added in v0.8.0

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