Documentation ¶
Index ¶
Constants ¶
View Source
const ( SpentAddressesImportBatchSize = 100000 SolidEntryPointCheckThresholdPast = 50 SolidEntryPointCheckThresholdFuture = 50 )
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") ErrNoSnapshotDownloadURL = fmt.Errorf("No download URL given for local snapshot under config option '%s", config.CfgLocalSnapshotsDownloadURL) 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.") ErrNotEnoughHistory = errors.New("not enough history.") ErrUnconfirmedTxInSubtangle = errors.New("Unconfirmed tx in subtangle") ErrInvalidBalance = errors.New("Invalid balance! Total does not match supply:") ErrWrongCoordinatorAddressDatabase = errors.New("Configured coordinator address does not match database information") )
View Source
var ErrUnsupportedLSFileVersion = errors.New("unsupported local snapshot file version")
View Source
var (
SupportedLocalSnapshotFileVersions = []byte{4}
)
Functions ¶
func CreateLocalSnapshot ¶ added in v0.3.0
func CreateLocalSnapshot(targetIndex milestone_index.MilestoneIndex, filePath string, abortSignal <-chan struct{}) error
func LoadGlobalSnapshot ¶
func LoadGlobalSnapshot(filePathLedger string, filePathsSpent []string, snapshotIndex milestone_index.MilestoneIndex) error
func LoadSnapshotFromFile ¶
Types ¶
type WriteCounter ¶ added in v0.4.0
WriteCounter counts the number of bytes written to it. It implements to the io.Writer interface and we can pass this into io.TeeReader() which will report progress on each write cycle.
func (WriteCounter) PrintProgress ¶ added in v0.4.0
func (wc WriteCounter) PrintProgress()
Click to show internal directories.
Click to hide internal directories.