Documentation ¶
Index ¶
- Constants
- Variables
- func DelegateRewardPerKey(nodeID discover.NodeID, stakingNum, epoch uint64) []byte
- func DelegateRewardPerKeys(nodeID discover.NodeID, stakingNum, fromEpoch, toEpoch uint64) [][]byte
- func GetHistoryIncreaseKey(year uint32) []byte
- func HistoryBalancePrefix(year uint32) []byte
- type DelegateRewardPer
- type DelegateRewardPerList
- func (d *DelegateRewardPerList) AppendDelegateRewardPer(per *DelegateRewardPer)
- func (d *DelegateRewardPerList) DecreaseTotalAmount(receipt []DelegateRewardReceipt) int
- func (d *DelegateRewardPerList) IsChange() bool
- func (d *DelegateRewardPerList) ShouldDel() bool
- func (d DelegateRewardPerList) String() string
- type DelegateRewardReceipt
- type NodeDelegateReward
- type NodeDelegateRewardPresenter
Constants ¶
View Source
const DelegateRewardPerLength = 1000
Variables ¶
View Source
var ( HistoryIncreasePrefix = []byte("RewardHistory") LastYearEndBalancePrefix = []byte("RewardBalance") YearStartBlockNumberKey = []byte("YearStartBlockNumberKey") YearStartTimeKey = []byte("YearStartTimeKey") RemainingRewardKey = []byte("RemainingRewardKey") NewBlockRewardKey = []byte("NewBlockRewardKey") StakingRewardKey = []byte("StakingRewardKey") ChainYearNumberKey = []byte("ChainYearNumberKey") )
View Source
var (
ErrDelegationNotFound = common.NewBizError(305001, "delegation info not found")
)
Functions ¶
func DelegateRewardPerKey ¶
func DelegateRewardPerKeys ¶
func GetHistoryIncreaseKey ¶
GetHistoryIncreaseKey used for search the balance of reward pool at last year
func HistoryBalancePrefix ¶
Types ¶
type DelegateRewardPer ¶
type DelegateRewardPer struct { //this is the node total effective delegate amount at this epoch DelegateAmount *big.Int Epoch uint64 //this is the node total delegate reward per amount at this epoch Per *big.Int }
func NewDelegateRewardPer ¶
func NewDelegateRewardPer(epoch uint64, per, totalDelegate *big.Int) *DelegateRewardPer
type DelegateRewardPerList ¶
type DelegateRewardPerList struct { Pers []*DelegateRewardPer // contains filtered or unexported fields }
func NewDelegateRewardPerList ¶
func NewDelegateRewardPerList() *DelegateRewardPerList
func (*DelegateRewardPerList) AppendDelegateRewardPer ¶
func (d *DelegateRewardPerList) AppendDelegateRewardPer(per *DelegateRewardPer)
func (*DelegateRewardPerList) DecreaseTotalAmount ¶
func (d *DelegateRewardPerList) DecreaseTotalAmount(receipt []DelegateRewardReceipt) int
func (*DelegateRewardPerList) IsChange ¶
func (d *DelegateRewardPerList) IsChange() bool
func (*DelegateRewardPerList) ShouldDel ¶
func (d *DelegateRewardPerList) ShouldDel() bool
func (DelegateRewardPerList) String ¶
func (d DelegateRewardPerList) String() string
type DelegateRewardReceipt ¶
type NodeDelegateReward ¶
Click to show internal directories.
Click to hide internal directories.