Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { SyncInterval time.Duration HareDelayLayers uint32 SyncCertDistance uint32 }
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, db *sql.Database, ticker layerTicker, beacon system.BeaconGetter, mesh *mesh.Mesh, fetcher layerFetcher, patrol layerPatrol, ch certHandler, 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) ListenToATXGossip ¶
ListenToATXGossip returns true if the node is listening to gossip for ATXs data.
func (*Syncer) ListenToGossip ¶
ListenToGossip returns true if the node is listening to gossip for blocks/TXs 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.