snapshot

package
v0.0.0-...-27c5394 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 4 more Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EblockPrefix = "eb:"
	EntryPreix   = "et:"
)

Variables

This section is empty.

Functions

func NewEntrySnapshot

func NewEntrySnapshot(dir string) *entrySnapshot

Types

type BalanceSnapshot

type BalanceSnapshot struct {
	NextHeight uint32

	*balances.Balances
}

func (*BalanceSnapshot) Process

func (bs *BalanceSnapshot) Process(log *logrus.Logger, db tools.Fetcher, height uint32, diagnostic bool) error

Process will process the height specified and load the balance changes into the memory maps. We pass the entire database to allow this function to do w/e it needs. Passing the height in explicitly just ensures we are loading blocks sequentially

type Config

type Config struct {
	Log           *logrus.Logger
	DB            tools.Fetcher
	DebugHeights  []uint32
	Stop          int64
	DumpDir       string
	RecordEntries bool
}

type Snapshotter

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

func New

func New(cfg Config) (*Snapshotter, error)

func (*Snapshotter) Done

func (s *Snapshotter) Done() error

Done is called to close up the snapshots

func (*Snapshotter) Dump

func (s *Snapshotter) Dump() error

func (*Snapshotter) WalkDB

func (s *Snapshotter) WalkDB() error

Jump to

Keyboard shortcuts

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