Documentation ¶
Index ¶
- Constants
- type ConsensusParamsGetter
- type ProtocolVersionSetter
- type VersionSnapshotter
- func (vs *VersionSnapshotter) Restore(_ uint64, format uint32, protoReader protoio.Reader) (snapshot.SnapshotItem, error)
- func (vs *VersionSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) error
- func (vs *VersionSnapshotter) SnapshotFormat() uint32
- func (vs *VersionSnapshotter) SnapshotName() string
- func (vs *VersionSnapshotter) SupportedFormats() []uint32
Constants ¶
View Source
const ( SnapshotName = "sg_version_snapshotter" SnapshotFormat = 0xFF )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsensusParamsGetter ¶
type ConsensusParamsGetter interface {
GetConsensusParams(ctx sdk.Context) *abci.ConsensusParams
}
type ProtocolVersionSetter ¶
type ProtocolVersionSetter interface {
SetProtocolVersion(uint64)
}
type VersionSnapshotter ¶
type VersionSnapshotter struct {
// contains filtered or unexported fields
}
func NewVersionSnapshotter ¶
func NewVersionSnapshotter(ms sdk.MultiStore, cpg ConsensusParamsGetter, vs ProtocolVersionSetter) *VersionSnapshotter
func (*VersionSnapshotter) Restore ¶
func (vs *VersionSnapshotter) Restore(_ uint64, format uint32, protoReader protoio.Reader) (snapshot.SnapshotItem, error)
Restore restores a state snapshot from the protobuf items read from the reader.
func (*VersionSnapshotter) Snapshot ¶
func (vs *VersionSnapshotter) Snapshot(height uint64, protoWriter protoio.Writer) error
Snapshot writes snapshot items into the protobuf writer.
func (*VersionSnapshotter) SnapshotFormat ¶
func (vs *VersionSnapshotter) SnapshotFormat() uint32
func (*VersionSnapshotter) SnapshotName ¶
func (vs *VersionSnapshotter) SnapshotName() string
func (*VersionSnapshotter) SupportedFormats ¶
func (vs *VersionSnapshotter) SupportedFormats() []uint32
Click to show internal directories.
Click to hide internal directories.