snapshot

package
v0.4.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 11 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(chainID isc.ChainID, 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
	ChainID    isc.ChainID
	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