Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SupportedVersions = Versions{2} // make sure to add the versions sorted asc
)
Functions ¶
This section is empty.
Types ¶
type Events ¶
type Events struct { // Emits a protocol parameters milestone option for the unsupported milestone one milestone before. NextMilestoneUnsupported *events.Event // Emits critical errors. CriticalErrors *events.Event }
Events are events happening around the Manager.
type Manager ¶
type Manager struct { // Events holds the events happening within the Manager. Events *Events // contains filtered or unexported fields }
Manager handles the knowledge about current, pending and supported protocol versions and parameters.
func NewManager ¶
NewManager creates a new Manager.
func (*Manager) Current ¶
func (m *Manager) Current() *iotago.ProtocolParameters
Current returns the current protocol parameters under which the node is operating.
func (*Manager) HandleConfirmedMilestone ¶
func (m *Manager) HandleConfirmedMilestone(cachedMilestone *storage.CachedMilestone)
HandleConfirmedMilestone examines the newly confirmed milestone for protocol parameter changes.
func (*Manager) NextPendingSupported ¶
NextPendingSupported tells whether the next pending protocol parameters changes are supported.
func (*Manager) Pending ¶
func (m *Manager) Pending() []*iotago.ProtocolParamsMilestoneOpt
Pending returns the currently pending protocol changes.
func (*Manager) SupportedVersions ¶
SupportedVersions returns a slice of supported protocol versions.
Click to show internal directories.
Click to hide internal directories.