slotnotarization

package
v1.0.0-beta.9 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Manager

type Manager struct {

	// ForceCommitMode contains a flag that indicates whether the manager is in force commit mode.
	ForceCommitMode atomic.Bool

	module.Module
	// contains filtered or unexported fields
}

Manager is the component that manages the slot commitments.

func NewManager

func NewManager(subModule module.Module, engine *engine.Engine) *Manager

func (*Manager) AcceptedBlocksCount

func (m *Manager) AcceptedBlocksCount(index iotago.SlotIndex) int

func (*Manager) ForceCommit

func (m *Manager) ForceCommit(slot iotago.SlotIndex) (*model.Commitment, error)

func (*Manager) ForceCommitUntil

func (m *Manager) ForceCommitUntil(commitUntilSlot iotago.SlotIndex) error

func (*Manager) IsBootstrapped

func (m *Manager) IsBootstrapped() bool

IsBootstrapped returns if the Manager finished committing all pending slots up to the current acceptance time.

func (*Manager) Reset

func (m *Manager) Reset()

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

func (*Manager) Shutdown

func (m *Manager) Shutdown()

type SlotMutations

type SlotMutations struct {
	// contains filtered or unexported fields
}

SlotMutations is an in-memory data structure that enables the collection of mutations for uncommitted slots.

func NewSlotMutations

func NewSlotMutations(lastCommittedSlot iotago.SlotIndex) *SlotMutations

NewSlotMutations creates a new SlotMutations instance.

func (*SlotMutations) AcceptedBlocksCount

func (m *SlotMutations) AcceptedBlocksCount(index iotago.SlotIndex) int

func (*SlotMutations) AddAcceptedBlock

func (m *SlotMutations) AddAcceptedBlock(block *blocks.Block) (err error)

AddAcceptedBlock adds the given block to the set of accepted blocks.

func (*SlotMutations) Commit

func (*SlotMutations) Reset

func (m *SlotMutations) Reset()

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

Jump to

Keyboard shortcuts

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