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) ChainContext ¶
func (s *ImmutableState) ChainContext(ctx context.Context) (string, error)
ChainContext returns the stored chain context.
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) SetChainContext ¶
func (s *MutableState) SetChainContext(ctx context.Context, chainContext string) error
SetChainContext sets the chain context.
NOTE: This method must only be called from InitChain context.
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.
Click to show internal directories.
Click to hide internal directories.