sync

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2020 License: Apache-2.0, BSD-2-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName is the plugin name of the sync plugin.
	PluginName = "Sync"
	// CfgSyncAnchorPointsCount defines the amount of anchor points to use to determine
	// whether a node is synchronized.
	CfgSyncAnchorPointsCount = "sync.anchorPointsCount"
	// CfgSyncAnchorPointsCleanupAfterSec defines the amount of time which is allowed to pass between setting an anchor
	// point and it not becoming solid (to clean its slot for another anchor point). It basically defines the expectancy
	// of how long it should take for an anchor point to become solid. Even if this value is set too low, usually a node
	// would eventually solidify collected anchor points.
	CfgSyncAnchorPointsCleanupAfterSec = "sync.anchorPointsCleanupAfterSec"
	// CfgSyncAnchorPointsCleanupIntervalSec defines the interval at which it is checked whether anchor points fall
	// into the cleanup window.
	CfgSyncAnchorPointsCleanupIntervalSec = "sync.anchorPointsCleanupIntervalSec"
	// CfgSyncDesyncedIfNoMessageAfterSec defines the time period in which new messages must be received and if not
	// the node is marked as desynced.
	CfgSyncDesyncedIfNoMessageAfterSec = "sync.desyncedIfNoMessagesAfterSec"
)

Variables

View Source
var (

	// ErrNodeNotSynchronized is returned when an operation can't be executed because
	// the node is not synchronized.
	ErrNodeNotSynchronized = errors.New("node is not synchronized")
)

Functions

func OverwriteSyncedState

func OverwriteSyncedState(syncedOverwrite bool)

OverwriteSyncedState overwrites the synced state with the given value.

func Plugin

func Plugin() *node.Plugin

Plugin gets the plugin instance.

func Synced

func Synced() bool

Synced tells whether the node is in a state we consider synchronized, meaning it has the relevant past and present message data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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