trivialsyncmanager

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

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