Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PluginName is the plugin name of the sync beacon plugin. PluginName = "SyncBeaconFollower" // CfgSyncBeaconFollowNodes defines the list of nodes this node should follow to determine its sync status. CfgSyncBeaconFollowNodes = "syncbeaconfollower.followNodes" // CfgSyncBeaconMaxTimeWindowSec defines the maximum time window for which a sync payload would be considerable. CfgSyncBeaconMaxTimeWindowSec = "syncbeaconfollower.maxTimeWindowSec" // CfgSyncBeaconMaxTimeOfflineSec defines the maximum time a beacon node can stay without receiving updates. CfgSyncBeaconMaxTimeOfflineSec = "syncbeaconfollower.maxTimeOffline" // CfgSyncBeaconCleanupInterval defines the interval that old beacon status are cleaned up. CfgSyncBeaconCleanupInterval = "syncbeaconfollower.cleanupInterval" // CfgSyncBeaconSyncPercentage defines the percentage of following nodes that have to be synced. CfgSyncBeaconSyncPercentage = "syncbeaconfollower.syncPercentage" )
Variables ¶
View Source
var ( // ErrMissingFollowNodes is returned if the node starts with no follow nodes list ErrMissingFollowNodes = errors.New("follow nodes list is required") // 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 SyncStatus ¶
SyncStatus returns the detailed status per beacon node.
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. The synchronized state is defined by following a certain set of sync beacon nodes where for each of these beacons a message needs to become solid within bounded time.
Types ¶
Click to show internal directories.
Click to hide internal directories.