Versions in this module Expand all Collapse all v1 v1.0.3 Apr 3, 2019 Changes in this version + func AddCoinActualRewards(state *state.StateDB, coinrewards *big.Int) + func AddStorageActualRewards(state *state.StateDB, storagerewards *big.Int) + func AddTotalActualRewards(state *state.StateDB, rewards *big.Int) + func CalcDifficulty(snap *CommitteeSnapshot, addr common.Address, blockNumber uint64) *big.Int + func CreateCommitteeRankByte(address []common.Address) []byte + func Ecrecover(header *types.Header) (common.Address, error) + func GetCoinActualRewards(state *state.StateDB) *big.Int + func GetCommiteeWrittenBlockNumberByTurn(config *params.GenaroConfig, turn uint64) uint64 + func GetCommitteeAccountBinding(header *types.Header) (committeeAccountBinding map[common.Address][]common.Address) + func GetDependTurnByBlockNumber(config *params.GenaroConfig, number uint64) uint64 + func GetFirstBlockNumberOfEpoch(config *params.GenaroConfig, epochNumber uint64) uint64 + func GetHeaderCommitteeRankList(header *types.Header) ([]common.Address, []uint64) + func GetLastBlockNumberOfEpoch(config *params.GenaroConfig, epochNumber uint64) uint64 + func GetPreCoinActualRewards(state *state.StateDB) *big.Int + func GetPreStorageActualRewards(state *state.StateDB) *big.Int + func GetPreSurplusCoin(state *state.StateDB) *big.Int + func GetStorageActualRewards(state *state.StateDB) *big.Int + func GetSurplusCoin(state *state.StateDB) *big.Int + func GetTotalActualRewards(state *state.StateDB) *big.Int + func GetTurnOfCommiteeByBlockNumber(config *params.GenaroConfig, number uint64) uint64 + func IsBackStakeBlockNumber(config *params.GenaroConfig, applyBlockNumber, nowBlockNumber uint64) bool + func ResetHeaderSignature(header *types.Header) + func SetCoinActualRewards(state *state.StateDB, coinrewards *big.Int) + func SetCommitteeAccountBinding(header *types.Header, ...) error + func SetHeaderCommitteeRankList(header *types.Header, committeeRank []common.Address, proportion []uint64) error + func SetHeaderSignature(header *types.Header, signature []byte) + func SetPreCoinActualRewards(state *state.StateDB, coinrewards *big.Int) + func SetPreStorageActualRewards(state *state.StateDB, storagerewards *big.Int) + func SetPreSurplusCoin(state *state.StateDB, surplusrewards *big.Int) + func SetStorageActualRewards(state *state.StateDB, storagerewards *big.Int) + func SetSurplusCoin(state *state.StateDB, surplusrewards *big.Int) + func SetTotalActualRewards(state *state.StateDB, rewards *big.Int) + func SubSurplusCoin(state *state.StateDB, rewards *big.Int) + type API struct + func (api *API) GetBlockCommittee(epochNumber uint64) []common.Address + func (api *API) GetSnapshot(epochNumber uint64) (*CommitteeSnapshot, error) + type CommitteeSnapshot struct + Committee map[common.Address]uint64 + CommitteeAccountBinding map[common.Address][]common.Address + CommitteeRank []common.Address + CommitteeSize uint64 + EpochNumber uint64 + WriteBlockHash common.Hash + WriteBlockNumber uint64 + type ExtraData struct + CommitteeAccountBinding map[common.Address][]common.Address + CommitteeRank []common.Address + LastSynBlockHash common.Hash + LastSynBlockNum uint64 + Proportion []uint64 + Signature []byte + func UnmarshalToExtra(header *types.Header) *ExtraData + type Genaro struct + func New(config *params.GenaroConfig, snapshotDb ethdb.Database) *Genaro + func (g *Genaro) APIs(chain consensus.ChainReader) []rpc.API + func (g *Genaro) Author(header *types.Header) (common.Address, error) + func (g *Genaro) Authorize(signer common.Address, signFn SignerFn) + func (g *Genaro) CalcDifficulty(chain consensus.ChainReader, time uint64, parent *types.Header) *big.Int + func (g *Genaro) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, ...) (*types.Block, error) + func (g *Genaro) Prepare(chain consensus.ChainReader, header *types.Header) error + func (g *Genaro) Seal(chain consensus.ChainReader, block *types.Block, stop <-chan struct{}) (*types.Block, error) + func (g *Genaro) VerifyHeader(chain consensus.ChainReader, header *types.Header, seal bool) error + func (g *Genaro) VerifyHeaders(chain consensus.ChainReader, headers []*types.Header, seals []bool) (chan<- struct{}, <-chan error) + func (g *Genaro) VerifySeal(chain consensus.ChainReader, header *types.Header) error + func (g *Genaro) VerifyUncles(chain consensus.ChainReader, block *types.Block) error + type SignerFn func(accounts.Account, []byte) ([]byte, error) + type Stake struct + Amount uint64 + BlockNumber uint64 + Staker common.Address