trivialsyncmanager

package
v1.0.0-alpha.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

NewProvider creates a new SyncManager provider.

func WithBootstrappedThreshold

func WithBootstrappedThreshold(threshold time.Duration) options.Option[SyncManager]

func WithIsBootstrappedFunc

func WithIsBootstrappedFunc(isBootstrapped isBootstrappedFunc) options.Option[SyncManager]

func WithSyncThreshold

func WithSyncThreshold(threshold time.Duration) options.Option[SyncManager]

Types

type SyncManager

type SyncManager struct {
	module.Module
	// contains filtered or unexported fields
}

func New

func New(subModule module.Module, e *engine.Engine, latestCommitment *model.Commitment, finalizedSlot iotago.SlotIndex, opts ...options.Option[SyncManager]) *SyncManager

func (*SyncManager) IsBootstrapped

func (s *SyncManager) IsBootstrapped() bool

func (*SyncManager) IsFinalizationDelayed

func (s *SyncManager) IsFinalizationDelayed() bool

func (*SyncManager) IsNodeSynced

func (s *SyncManager) IsNodeSynced() bool

func (*SyncManager) LastAcceptedBlockSlot

func (s *SyncManager) LastAcceptedBlockSlot() iotago.SlotIndex

func (*SyncManager) LastConfirmedBlockSlot

func (s *SyncManager) LastConfirmedBlockSlot() iotago.SlotIndex

func (*SyncManager) LastPrunedEpoch

func (s *SyncManager) LastPrunedEpoch() (iotago.EpochIndex, bool)

func (*SyncManager) LatestCommitment

func (s *SyncManager) LatestCommitment() *model.Commitment

func (*SyncManager) LatestFinalizedSlot

func (s *SyncManager) LatestFinalizedSlot() iotago.SlotIndex

func (*SyncManager) Reset

func (s *SyncManager) Reset()

Reset resets the component to a clean state as if it was created at the last commitment.

func (*SyncManager) SyncStatus

func (s *SyncManager) SyncStatus() *syncmanager.SyncStatus

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL