mock

package
v1.0.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type ManualPOA

type ManualPOA struct {
	module.Module
	// contains filtered or unexported fields
}

func NewManualPOA

func NewManualPOA(e iotago.APIProvider, committeeStore epochstore.Store[*account.SeatedAccounts]) *ManualPOA

func (*ManualPOA) AccountID

func (m *ManualPOA) AccountID(alias string) iotago.AccountID

func (*ManualPOA) Accounts

func (m *ManualPOA) Accounts() *account.Accounts

func (*ManualPOA) AddAccount

func (m *ManualPOA) AddAccount(id iotago.AccountID, alias string) iotago.AccountID

func (*ManualPOA) AddRandomAccounts

func (m *ManualPOA) AddRandomAccounts(aliases ...string) (accountIDs []iotago.AccountID)

func (*ManualPOA) CommitteeInEpoch

func (m *ManualPOA) CommitteeInEpoch(epoch iotago.EpochIndex) (*account.SeatedAccounts, bool)

CommitteeInEpoch returns the set of validators selected to be part of the committee in the given epoch.

func (*ManualPOA) CommitteeInSlot

func (m *ManualPOA) CommitteeInSlot(slot iotago.SlotIndex) (*account.SeatedAccounts, bool)

CommitteeInSlot returns the set of validators selected to be part of the committee in the given slot.

func (*ManualPOA) GetSeat

func (m *ManualPOA) GetSeat(alias string) (account.SeatIndex, bool)

func (*ManualPOA) InitializeCommittee

func (m *ManualPOA) InitializeCommittee(_ iotago.EpochIndex, _ time.Time) error

func (*ManualPOA) OnlineCommittee

func (m *ManualPOA) OnlineCommittee() ds.Set[account.SeatIndex]

func (*ManualPOA) ReuseCommittee

func (m *ManualPOA) ReuseCommittee(currentEpoch iotago.EpochIndex, targetEpoch iotago.EpochIndex) (*account.SeatedAccounts, error)

func (*ManualPOA) RotateCommittee

func (m *ManualPOA) RotateCommittee(epoch iotago.EpochIndex, validators accounts.AccountsData) (*account.SeatedAccounts, error)

func (*ManualPOA) SeatCountInEpoch

func (m *ManualPOA) SeatCountInEpoch(_ iotago.EpochIndex) int

func (*ManualPOA) SeatCountInSlot

func (m *ManualPOA) SeatCountInSlot(_ iotago.SlotIndex) int

func (*ManualPOA) SetOffline

func (m *ManualPOA) SetOffline(aliases ...string)

func (*ManualPOA) SetOnline

func (m *ManualPOA) SetOnline(aliases ...string)

func (*ManualPOA) Shutdown

func (m *ManualPOA) Shutdown()

Jump to

Keyboard shortcuts

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