trivialsyncmanager

package
v1.0.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 11 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 WithBootstrappedFunc

func WithBootstrappedFunc(isBootstrapped func(*engine.Engine) bool) options.Option[SyncManager]

func WithBootstrappedThreshold

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

Types

type SyncManager

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

func New

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

func (*SyncManager) IsBootstrapped

func (s *SyncManager) IsBootstrapped() 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) Shutdown

func (s *SyncManager) Shutdown()

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