snapshot

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SpentAddressesImportBatchSize            = 100000
	SolidEntryPointCheckThresholdPast        = 50
	SolidEntryPointCheckThresholdFuture      = 50
	SupportedLocalSnapshotFileVersion   byte = 3
)
View Source
const (
	// AdditionalPruningThreshold is needed, because the transactions in the getMilestoneApprovees call in getSolidEntryPoints
	// can reference older transactions as well
	AdditionalPruningThreshold = 50
)

Variables

View Source
var (
	PLUGIN = node.NewPlugin("Snapshot", node.Enabled, configure, run)

	ErrNoSnapshotSpecified        = errors.New("no snapshot file was specified in the config")
	ErrSnapshotImportWasAborted   = errors.New("snapshot import was aborted")
	ErrSnapshotImportFailed       = errors.New("snapshot import failed")
	ErrSnapshotCreationWasAborted = errors.New("operation was aborted")
	ErrSnapshotCreationFailed     = errors.New("creating snapshot failed: %v")
	ErrTargetIndexTooNew          = errors.New("snapshot target is too new.")
	ErrTargetIndexTooOld          = errors.New("snapshot target is too old.")
)
View Source
var ErrUnsupportedLSFileVersion = errors.New("unsupported local snapshot file version")

Functions

func CreateLocalSnapshot added in v0.3.0

func CreateLocalSnapshot(targetIndex milestone_index.MilestoneIndex, filePath string, abortSignal <-chan struct{}) error

func LoadEmptySnapshot

func LoadEmptySnapshot(filePathLedger string) error

func LoadGlobalSnapshot

func LoadGlobalSnapshot(filePathLedger string, filePathSpent []string, snapshotIndex milestone_index.MilestoneIndex) error

func LoadSnapshotFromFile

func LoadSnapshotFromFile(filePath string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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