Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StatefulSyncer ¶
type StatefulSyncer struct {
// contains filtered or unexported fields
}
StatefulSyncer is an abstraction layer over the stateless syncer package. This layer handles sync restarts and provides fully populated blocks during reorgs (not provided by stateless syncer).
func New ¶
func New( ctx context.Context, network *types.NetworkIdentifier, fetcher *fetcher.Fetcher, blockStorage *storage.BlockStorage, counterStorage *storage.CounterStorage, logger *logger.Logger, cancel context.CancelFunc, workers []storage.BlockWorker, ) *StatefulSyncer
New returns a new *StatefulSyncer.
func (*StatefulSyncer) BlockAdded ¶
BlockAdded is called by the syncer when a block is added.
func (*StatefulSyncer) BlockRemoved ¶
func (s *StatefulSyncer) BlockRemoved( ctx context.Context, blockIdentifier *types.BlockIdentifier, ) error
BlockRemoved is called by the syncer when a block is removed.
Click to show internal directories.
Click to hide internal directories.