Documentation ¶
Index ¶
- type VerificationDataType
- type Winner
- type WinnerChallenge
- type WinnersList
- func (w *WinnersList) Append(item Winner)
- func (w *WinnersList) AppendWithAggregateRewards(item Winner)
- func (w WinnersList) FindByAddress(address string) int
- func (w *WinnersList) GetItem(index int) Winner
- func (w *WinnersList) GetItems() []Winner
- func (w *WinnersList) GetVerifiedOnly() WinnersList
- func (w WinnersList) Length() int
- func (w *WinnersList) Merge(newList WinnersList)
- func (w *WinnersList) MergeWithAggregateRewards(newList WinnersList)
- func (w WinnersList) Print()
- func (w WinnersList) Trim(length int) WinnersList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VerificationDataType ¶
type Winner ¶
type Winner struct { Address string // Account Address Rewards uint64 // Total Reward of a winner ParticipantData participants.ParticipantRecord // If the information of this winner account if verified ValidatorInfo validators.ValidatorInfo // If the winner is a validator, the data will be set here }
type WinnerChallenge ¶
type WinnersList ¶
type WinnersList struct {
// contains filtered or unexported fields
}
func (*WinnersList) Append ¶
func (w *WinnersList) Append(item Winner)
func (*WinnersList) AppendWithAggregateRewards ¶
func (w *WinnersList) AppendWithAggregateRewards(item Winner)
func (WinnersList) FindByAddress ¶
func (w WinnersList) FindByAddress(address string) int
Return result:
-1 : Not found >-1: The item index
func (*WinnersList) GetItem ¶
func (w *WinnersList) GetItem(index int) Winner
func (*WinnersList) GetItems ¶
func (w *WinnersList) GetItems() []Winner
func (*WinnersList) GetVerifiedOnly ¶
func (w *WinnersList) GetVerifiedOnly() WinnersList
func (WinnersList) Length ¶
func (w WinnersList) Length() int
func (*WinnersList) Merge ¶
func (w *WinnersList) Merge(newList WinnersList)
This function merges two lists of winners if a winner already exist, it is not added
func (*WinnersList) MergeWithAggregateRewards ¶
func (w *WinnersList) MergeWithAggregateRewards(newList WinnersList)
This function merges two lists of winners and aggregates the rewards If a winner already exist, her/his rewards will be aggregated
func (WinnersList) Print ¶
func (w WinnersList) Print()
func (WinnersList) Trim ¶
func (w WinnersList) Trim(length int) WinnersList
This function cuts the end of a list
Click to show internal directories.
Click to hide internal directories.