Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Rewarder ¶
type Rewarder interface { ProcessReward(Formulator common.Address, ctx *data.Context) ([]byte, error) ApplyGenesis(ctx *data.ContextData) ([]byte, error) LoadFromSaveData([]byte) error }
Rewarder procceses rewards of the target height
type TestNetRewarder ¶
type TestNetRewarder struct { LastPaidHeight uint32 PowerMap map[common.Address]*amount.Amount StakingPowerMap map[common.Address]map[common.Address]*amount.Amount }
func NewTestNetRewarder ¶
func NewTestNetRewarder() *TestNetRewarder
func (*TestNetRewarder) ApplyGenesis ¶
func (rd *TestNetRewarder) ApplyGenesis(ctx *data.ContextData) ([]byte, error)
ApplyGenesis init genesis data
func (*TestNetRewarder) LoadFromSaveData ¶
func (rd *TestNetRewarder) LoadFromSaveData(SaveData []byte) error
LoadFromSaveData recover the status using the save data
func (*TestNetRewarder) ProcessReward ¶
ProcessReward gives a reward to the block generator address
Click to show internal directories.
Click to hide internal directories.