slotnotarization

package
v1.0.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2024 License: Apache-2.0 Imports: 24 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

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