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 *event.Event1[*iotago.ProtocolParamsMilestoneOpt] // Emits critical errors. CriticalErrors *event.Event1[error] }
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 ¶
HandleConfirmedMilestone examines the newly confirmed milestone payload 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.