state

package
v0.2103.13 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImmutableState

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

ImmutableState is an immutable consensus backend state wrapper.

func NewImmutableState

func NewImmutableState(ctx context.Context, state api.ApplicationQueryState, version int64) (*ImmutableState, error)

NewImmutableState creates a new immutable consensus backend state wrapper.

func (*ImmutableState) ConsensusParameters

func (s *ImmutableState) ConsensusParameters(ctx context.Context) (*consensusGenesis.Parameters, error)

ConsensusParameters returns the consensus parameters.

type MutableState

type MutableState struct {
	*ImmutableState
	// contains filtered or unexported fields
}

MutableState is a mutable consensus backend state wrapper.

func NewMutableState

func NewMutableState(tree mkvs.KeyValueTree) *MutableState

NewMutableState creates a new mutable consensus backend state wrapper.

func (*MutableState) SetConsensusParameters

func (s *MutableState) SetConsensusParameters(ctx context.Context, params *consensusGenesis.Parameters) error

SetConsensusParameters sets the consensus parameters.

NOTE: This method must only be called from InitChain/EndBlock contexts.

Jump to

Keyboard shortcuts

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