Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
Configuration is the config params for syncer.
type Syncer ¶
type Syncer struct {
// contains filtered or unexported fields
}
Syncer is responsible to keep the node in sync with the network.
func NewSyncer ¶
func NewSyncer(ctx context.Context, conf Configuration, ticker layerTicker, beacons system.BeaconGetter, mesh *mesh.Mesh, fetcher layerFetcher, patrol layerPatrol, logger log.Log) *Syncer
NewSyncer creates a new Syncer instance.
func (*Syncer) Close ¶
func (s *Syncer) Close()
Close stops the syncing process and the goroutines syncer spawns.
func (*Syncer) ForceSync ¶
ForceSync manually starts a sync process outside the main sync loop. If the node is already running a sync process, ForceSync will be ignored.
func (*Syncer) ListenToGossip ¶
ListenToGossip returns true if the node is listening to gossip for blocks/TXs/ATXs data.
func (*Syncer) RegisterChForSynced ¶
RegisterChForSynced registers ch for notification when the node enters synced state.
Click to show internal directories.
Click to hide internal directories.