badger

package
v0.10.1-print-result-id Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: AGPL-3.0 Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutator

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

func (*Mutator) Bootstrap

func (m *Mutator) Bootstrap(genesis *cluster.Block) error

func (*Mutator) Extend

func (m *Mutator) Extend(block *cluster.Block) error

type Params added in v0.9.6

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

func (*Params) ChainID added in v0.9.6

func (p *Params) ChainID() (flow.ChainID, error)

type Snapshot

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

Snapshot represents a snapshot of chain state anchored at a particular reference block.

func (*Snapshot) Collection

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

func (*Snapshot) Head

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

func (*Snapshot) Pending

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

type State

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

func NewState

func NewState(db *badger.DB, tracer module.Tracer, clusterID flow.ChainID, headers storage.Headers, payloads storage.ClusterPayloads) (*State, error)

func (*State) AtBlockID

func (s *State) AtBlockID(blockID flow.Identifier) cluster.Snapshot

func (*State) Final

func (s *State) Final() cluster.Snapshot

func (*State) Mutate

func (s *State) Mutate() cluster.Mutator

func (*State) Params added in v0.9.6

func (s *State) Params() cluster.Params

type Translator

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

Translator is a translation layer that determines the reference block on the main chain for a given cluster block, using the reference block from the cluster block's payload.

func NewTranslator

func NewTranslator(payloads storage.ClusterPayloads, state protocol.State) *Translator

NewTranslator returns a new block ID translator.

func (*Translator) Translate

func (t *Translator) Translate(blockID flow.Identifier) (flow.Identifier, error)

Translate retrieves the reference main-chain block ID for the given cluster block ID.

Jump to

Keyboard shortcuts

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