Documentation ¶
Overview ¶
Package state is deprecated.
Index ¶
- type ImmutableState
- func (s *ImmutableState) Beacon(ctx context.Context) ([]byte, error)
- func (s *ImmutableState) ConsensusParameters(ctx context.Context) (*beacon.ConsensusParameters, error)
- func (s *ImmutableState) GetEpoch(ctx context.Context) (beacon.EpochTime, int64, error)
- func (s *ImmutableState) GetFutureEpoch(ctx context.Context) (*beacon.EpochTimeState, error)
- func (s *ImmutableState) PendingMockEpoch(ctx context.Context) (*beacon.EpochTime, error)
- func (s *ImmutableState) VRFState(ctx context.Context) (*beacon.VRFState, error)
- type MutableState
- func (s *MutableState) ClearFutureEpoch(ctx context.Context) error
- func (s *MutableState) ClearPendingMockEpoch(ctx context.Context) error
- func (s *MutableState) DebugForceSetBeacon(ctx context.Context, newBeacon []byte) error
- func (s *MutableState) SetBeacon(ctx context.Context, newBeacon []byte) error
- func (s *MutableState) SetConsensusParameters(ctx context.Context, params *beacon.ConsensusParameters) error
- func (s *MutableState) SetEpoch(ctx context.Context, epoch beacon.EpochTime, height int64) error
- func (s *MutableState) SetFutureEpoch(ctx context.Context, epoch beacon.EpochTime, height int64) error
- func (s *MutableState) SetPendingMockEpoch(ctx context.Context, epoch beacon.EpochTime) error
- func (s *MutableState) SetVRFState(ctx context.Context, state *beacon.VRFState) error
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 the immutable beacon state wrapper.
func NewImmutableState ¶
func NewImmutableState(ctx context.Context, state abciAPI.ApplicationQueryState, version int64) (*ImmutableState, error)
func (*ImmutableState) Beacon ¶
func (s *ImmutableState) Beacon(ctx context.Context) ([]byte, error)
Beacon gets the current random beacon value.
func (*ImmutableState) ConsensusParameters ¶
func (s *ImmutableState) ConsensusParameters(ctx context.Context) (*beacon.ConsensusParameters, error)
func (*ImmutableState) GetFutureEpoch ¶ added in v0.2100.0
func (s *ImmutableState) GetFutureEpoch(ctx context.Context) (*beacon.EpochTimeState, error)
func (*ImmutableState) PendingMockEpoch ¶ added in v0.2200.0
type MutableState ¶
type MutableState struct { *ImmutableState // contains filtered or unexported fields }
MutableState is a mutable beacon state wrapper.
func NewMutableState ¶
func NewMutableState(tree mkvs.KeyValueTree) *MutableState
NewMutableState creates a new mutable beacon state wrapper.
func (*MutableState) ClearFutureEpoch ¶ added in v0.2100.0
func (s *MutableState) ClearFutureEpoch(ctx context.Context) error
func (*MutableState) ClearPendingMockEpoch ¶ added in v0.2200.0
func (s *MutableState) ClearPendingMockEpoch(ctx context.Context) error
func (*MutableState) DebugForceSetBeacon ¶ added in v0.2200.0
func (s *MutableState) DebugForceSetBeacon(ctx context.Context, newBeacon []byte) error
DebugForceSetBeacon sets the beacon to an arbitrary byte-string, ignoring the length requirements. See ../../scheduler/scheduler_test.go for why this exists.
func (*MutableState) SetBeacon ¶
func (s *MutableState) SetBeacon(ctx context.Context, newBeacon []byte) error
func (*MutableState) SetConsensusParameters ¶
func (s *MutableState) SetConsensusParameters(ctx context.Context, params *beacon.ConsensusParameters) error
SetConsensusParameters sets beacon consensus parameters.
NOTE: This method must only be called from InitChain/EndBlock contexts.
func (*MutableState) SetFutureEpoch ¶ added in v0.2100.0
func (*MutableState) SetPendingMockEpoch ¶ added in v0.2200.0
func (*MutableState) SetVRFState ¶ added in v0.2200.0
Click to show internal directories.
Click to hide internal directories.