// CfgBootstrapTimeUnit defines the time unit (in seconds) of the issuance rate (e.g., 3 messages per 12 seconds).
CfgBootstrapTimeUnit="bootstrap.timeUnit"
// the messages per period to issue when in bootstrapping mode.
initialIssuanceRate=1
// the value which determines a continuous issuance of messages from the bootstrap plugin.
continuousIssuance=-1
)
funcinit(){
flag.Int(CfgBootstrapInitialIssuanceTimePeriodSec,-1,"the initial time period of how long the node should be issuing messages when started in bootstrapping mode. "+
"if the value is set to -1, the issuance is continuous.")
flag.Int(CfgBootstrapTimeUnit,5,"the time unit (in seconds) of the issuance rate (e.g., 1 messages per 5 seconds).")
}
var(
// plugin is the plugin instance of the bootstrap plugin.
flag.Int(CfgSyncAnchorPointsCount,3,"the amount of anchor points to use to determine whether a node is synchronized")
flag.Int(CfgSyncDesyncedIfNoMessageAfterSec,300,"the time period in seconds which sets the node as desynced if no new messages are received")
flag.Int(CfgSyncAnchorPointsCleanupIntervalSec,10,"the interval at which it is checked whether anchor points fall into the cleanup window")
flag.Int(CfgSyncAnchorPointsCleanupAfterSec,60,"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)")
}
var(
// plugin is the plugin instance of the sync plugin.
plugin*node.Plugin
oncesync.Once
// ErrNodeNotSynchronized is returned when an operation can't be executed because
// the node is not synchronized.
ErrNodeNotSynchronized=errors.New("node is not synchronized")