Documentation ¶
Index ¶
- type Accounts
- func (a *Accounts) Bytes() ([]byte, error)
- func (a *Accounts) ForEach(callback func(id iotago.AccountID, pool *Pool) bool)
- func (a *Accounts) Get(id iotago.AccountID) (pool *Pool, exists bool)
- func (a *Accounts) Has(id iotago.AccountID) bool
- func (a *Accounts) IDs() []iotago.AccountID
- func (a *Accounts) SeatedAccounts(optPrevCommittee ...*SeatedAccounts) *SeatedAccounts
- func (a *Accounts) Set(id iotago.AccountID, pool *Pool) error
- func (a *Accounts) Size() int
- func (a *Accounts) TotalStake() iotago.BaseToken
- func (a *Accounts) TotalValidatorStake() iotago.BaseToken
- type Pool
- type SeatIndex
- type SeatedAccounts
- func (s *SeatedAccounts) Accounts() (*Accounts, error)
- func (s *SeatedAccounts) Bytes() ([]byte, error)
- func (s *SeatedAccounts) Delete(id iotago.AccountID) bool
- func (s *SeatedAccounts) GetSeat(id iotago.AccountID) (seat SeatIndex, exists bool)
- func (s *SeatedAccounts) HasAccount(id iotago.AccountID) (has bool)
- func (s *SeatedAccounts) IDs() []iotago.AccountID
- func (s *SeatedAccounts) IsReused() bool
- func (s *SeatedAccounts) Reuse() (*SeatedAccounts, error)
- func (s *SeatedAccounts) SeatCount() int
- func (s *SeatedAccounts) Set(seat SeatIndex, id iotago.AccountID) bool
- func (s *SeatedAccounts) SetReused()
- func (s *SeatedAccounts) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
Accounts represent a collection of accounts and their pools.
func (*Accounts) ForEach ¶
ForEach iterates over all weights and calls the given callback for each of them.
func (*Accounts) SeatedAccounts ¶
func (a *Accounts) SeatedAccounts(optPrevCommittee ...*SeatedAccounts) *SeatedAccounts
SeatedAccounts creates a new SeatedAccounts instance, that maintains the seat indices of re-elected members from the previous committee, if provided.
func (*Accounts) TotalStake ¶
func (*Accounts) TotalValidatorStake ¶
type Pool ¶
type Pool struct { // Total stake of the pool, including delegators PoolStake iotago.BaseToken // Validator's stake ValidatorStake iotago.BaseToken FixedCost iotago.Mana }
Pool represents all the data we need for a given validator and epoch to calculate its rewards data.
type SeatedAccounts ¶
type SeatedAccounts struct {
// contains filtered or unexported fields
}
func NewSeatedAccounts ¶
func NewSeatedAccounts(accounts *Accounts, optMembers ...iotago.AccountID) *SeatedAccounts
func SeatedAccountsFromBytes ¶
func SeatedAccountsFromBytes(b []byte) (*SeatedAccounts, int, error)
func SeatedAccountsFromReader ¶
func SeatedAccountsFromReader(reader io.Reader) (*SeatedAccounts, error)
func (*SeatedAccounts) Accounts ¶
func (s *SeatedAccounts) Accounts() (*Accounts, error)
func (*SeatedAccounts) Bytes ¶
func (s *SeatedAccounts) Bytes() ([]byte, error)
func (*SeatedAccounts) GetSeat ¶
func (s *SeatedAccounts) GetSeat(id iotago.AccountID) (seat SeatIndex, exists bool)
func (*SeatedAccounts) HasAccount ¶
func (s *SeatedAccounts) HasAccount(id iotago.AccountID) (has bool)
func (*SeatedAccounts) IDs ¶
func (s *SeatedAccounts) IDs() []iotago.AccountID
func (*SeatedAccounts) IsReused ¶
func (s *SeatedAccounts) IsReused() bool
func (*SeatedAccounts) Reuse ¶
func (s *SeatedAccounts) Reuse() (*SeatedAccounts, error)
func (*SeatedAccounts) SeatCount ¶
func (s *SeatedAccounts) SeatCount() int
func (*SeatedAccounts) SetReused ¶
func (s *SeatedAccounts) SetReused()
func (*SeatedAccounts) String ¶
func (s *SeatedAccounts) String() string
Click to show internal directories.
Click to hide internal directories.