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) IsReused() bool
- func (a *Accounts) SeatedAccounts(members ...iotago.AccountID) *SeatedAccounts
- func (a *Accounts) Set(id iotago.AccountID, pool *Pool) error
- func (a *Accounts) SetReused()
- 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) 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) SeatCount() int
- func (s *SeatedAccounts) Set(seat SeatIndex, id iotago.AccountID) bool
- 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(members ...iotago.AccountID) *SeatedAccounts
SeatedAccounts creates a new SeatedAccounts instance, that maintains the seats of the given members.
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 (*SeatedAccounts) Accounts ¶
func (s *SeatedAccounts) Accounts() (*Accounts, 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) SeatCount ¶
func (s *SeatedAccounts) SeatCount() int
func (*SeatedAccounts) String ¶
func (s *SeatedAccounts) String() string
Click to show internal directories.
Click to hide internal directories.