Documentation ¶
Index ¶
- func NewProvider(opts ...options.Option[SyncManager]) module.Provider[*engine.Engine, syncmanager.SyncManager]
- func WithBootstrappedFunc(isBootstrapped func(*engine.Engine) bool) options.Option[SyncManager]
- func WithBootstrappedThreshold(threshold time.Duration) options.Option[SyncManager]
- type SyncManager
- func (s *SyncManager) IsBootstrapped() bool
- func (s *SyncManager) IsNodeSynced() bool
- func (s *SyncManager) LastAcceptedBlockSlot() iotago.SlotIndex
- func (s *SyncManager) LastConfirmedBlockSlot() iotago.SlotIndex
- func (s *SyncManager) LastPrunedEpoch() (iotago.EpochIndex, bool)
- func (s *SyncManager) LatestCommitment() *model.Commitment
- func (s *SyncManager) LatestFinalizedSlot() iotago.SlotIndex
- func (s *SyncManager) Reset()
- func (s *SyncManager) Shutdown()
- func (s *SyncManager) SyncStatus() *syncmanager.SyncStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewProvider ¶
func NewProvider(opts ...options.Option[SyncManager]) module.Provider[*engine.Engine, syncmanager.SyncManager]
NewProvider creates a new SyncManager provider.
func WithBootstrappedFunc ¶
func WithBootstrappedThreshold ¶
func WithBootstrappedThreshold(threshold time.Duration) options.Option[SyncManager]
Types ¶
type SyncManager ¶
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
Click to show internal directories.
Click to hide internal directories.