snapshot

package
v0.6.1-alpha.4-prerelease Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockFileName

func BlockFileName(chainid string, index uint32, h state.BlockHash) string

func FileName

func FileName(stateIndex uint32) string

func WriteKVToStream

func WriteKVToStream(store kv.KVIterator, stream kv.StreamWriter, p ...ConsoleReportParams) error

WriteKVToStream dumps k/v pairs of the state into the file. Keys are not sorted, so the result in general is not deterministic

func WriteSnapshot

func WriteSnapshot(sr state.State, dir string, p ...ConsoleReportParams) error

Types

type ConsoleReportParams

type ConsoleReportParams struct {
	Console           io.Writer
	StatsEveryKVPairs int
}

type FileProperties

type FileProperties struct {
	FileName   string
	StateIndex uint32
	TimeStamp  time.Time
	NumRecords int
	MaxKeyLen  int
	Bytes      int
}

func Scan

func Scan(rdr kv.StreamIterator) (*FileProperties, error)

func ScanFile

func ScanFile(fname string) (*FileProperties, error)

Jump to

Keyboard shortcuts

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