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

invalid

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snapshot

type Snapshot struct {
	// contains filtered or unexported fields
}

Snapshot represents a snapshot that does not exist or could not be queried.

func NewSnapshot

func NewSnapshot(err error) *Snapshot

NewSnapshot returns a new invalid snapshot, containing an error describing why the snapshot could not be retrieved. The following are typical errors resulting in the construction of an invalid Snapshot:

  • state.ErrUnknownSnapshotReference if the reference point for the snapshot (height or block ID) does not resolve to a queriable block in the state.
  • generic error in case of unexpected state inconsistencies or bugs

func NewSnapshotf

func NewSnapshotf(msg string, args ...interface{}) *Snapshot

NewSnapshotf is NewSnapshot with ergonomic error formatting.

func (*Snapshot) Collection

func (u *Snapshot) Collection() (*flow.Collection, error)

func (*Snapshot) Head

func (u *Snapshot) Head() (*flow.Header, error)

func (*Snapshot) Pending

func (u *Snapshot) Pending() ([]flow.Identifier, error)

Jump to

Keyboard shortcuts

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