state

package
v0.2400.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 9 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 a immutable state wrapper.

func NewImmutableState

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

NewImmutableState creates a new immutable state wrapper.

func (*ImmutableState) AllStatuses

func (st *ImmutableState) AllStatuses(ctx context.Context) ([]*churp.Status, error)

AllStatuses returns the CHURP statuses for all runtimes.

func (*ImmutableState) ConsensusParameters

func (st *ImmutableState) ConsensusParameters(ctx context.Context) (*churp.ConsensusParameters, error)

ConsensusParameters returns the consensus parameters.

func (*ImmutableState) Status

func (st *ImmutableState) Status(ctx context.Context, runtimeID common.Namespace, churpID uint8) (*churp.Status, error)

Status returns the CHURP status for the specified runtime and CHURP instance.

func (*ImmutableState) Statuses

func (st *ImmutableState) Statuses(ctx context.Context, runtimeID common.Namespace) ([]*churp.Status, error)

Statuses returns the CHURP statuses for the specified runtime.

type MutableState

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

MutableState is a mutable state wrapper.

func NewMutableState

func NewMutableState(tree mkvs.KeyValueTree) *MutableState

NewMutableState creates a new mutable state wrapper.

func (*MutableState) SetConsensusParameters

func (st *MutableState) SetConsensusParameters(ctx context.Context, params *churp.ConsensusParameters) error

SetConsensusParameters updates the state using the provided consensus parameters.

This method must only be called from InitChain or EndBlock contexts.

func (*MutableState) SetStatus

func (st *MutableState) SetStatus(ctx context.Context, status *churp.Status) error

SetStatus updates the state using the provided CHURP status.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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