Documentation ¶
Index ¶
- Constants
- type ChainReader
- type SelectedReward
- func (sr *SelectedReward) CaclSelectedDeposit(newGraph []common.Address, originElectNodes map[common.Address]uint16, ...) map[common.Address]util.DepositInfo
- func (sr *SelectedReward) GetSelectedRewards(reward *big.Int, state util.StateDB, chain util.ChainReader, ...) map[common.Address]*big.Int
- func (sr *SelectedReward) GetTopAndDeposit(chain util.ChainReader, state util.StateDB, currentNum uint64, ...) ([]common.Address, map[common.Address]uint16, error)
Constants ¶
View Source
const (
PackageName = "参与奖励"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChainReader ¶
type ChainReader interface { // Config retrieves the blockchain's chain configuration. Config() *params.ChainConfig // CurrentHeader retrieves the current header from the local chain. CurrentHeader() *types.Header // GetHeader retrieves a block header from the database by hash and number. GetHeader(hash common.Hash, number uint64) *types.Header // GetHeaderByNumber retrieves a block header from the database by number. GetHeaderByNumber(number uint64) *types.Header // GetHeaderByHash retrieves a block header from the database by its hash. GetHeaderByHash(hash common.Hash) *types.Header GetBlockByNumber(number uint64) *types.Block // GetBlock retrieves a block sfrom the database by hash and number. GetBlock(hash common.Hash, number uint64) *types.Block StateAt(root common.Hash) (*state.StateDB, error) State() (*state.StateDB, error) NewTopologyGraph(header *types.Header) (*mc.TopologyGraph, error) }
type SelectedReward ¶
type SelectedReward struct { }
func (*SelectedReward) CaclSelectedDeposit ¶
func (*SelectedReward) GetSelectedRewards ¶
func (sr *SelectedReward) GetSelectedRewards(reward *big.Int, state util.StateDB, chain util.ChainReader, roleType common.RoleType, currentNum uint64, rate uint64, topology *mc.TopologyGraph, elect *mc.ElectGraph) map[common.Address]*big.Int
func (*SelectedReward) GetTopAndDeposit ¶
func (sr *SelectedReward) GetTopAndDeposit(chain util.ChainReader, state util.StateDB, currentNum uint64, roleType common.RoleType, currentTop *mc.TopologyGraph, originElectNodes *mc.ElectGraph) ([]common.Address, map[common.Address]uint16, error)
Click to show internal directories.
Click to hide internal directories.