snapshot

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2019 License: GPL-3.0 Imports: 8 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockInfo

type BlockInfo struct {
	Number    uint64
	BlockHash common.Hash
	Timestamp uint64 // previous snapshot timestamp
}

BlockInfo store stateDB

type SnapshotManager

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

SnapshotManager snapshot manager object

func NewSnapshotManager

func NewSnapshotManager(state *state.StateDB) *SnapshotManager

NewSnapshotManager create manager

func (*SnapshotManager) GetCurrentSnapshotHash

func (sn *SnapshotManager) GetCurrentSnapshotHash() (uint64, common.Hash, error)

func (*SnapshotManager) GetLastSnapshotTime

func (sn *SnapshotManager) GetLastSnapshotTime() (uint64, error)

GetLastSnapshot get last snapshot time

func (*SnapshotManager) GetPrevSnapshotTime

func (sn *SnapshotManager) GetPrevSnapshotTime(time uint64) (uint64, error)

GetPrevSnapshot get previous snapshot time

func (*SnapshotManager) GetSnapshotMsg

func (sn *SnapshotManager) GetSnapshotMsg(account string, key string, time uint64) ([]byte, error)

func (*SnapshotManager) GetSnapshotState

func (sn *SnapshotManager) GetSnapshotState(time uint64) (*state.StateDB, error)

GetSnapshotState get snapshot state

func (*SnapshotManager) SetSnapshot

func (sn *SnapshotManager) SetSnapshot(time uint64, blockInfo BlockInfo) error

Jump to

Keyboard shortcuts

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