{"modulePath":"github.com/chainopen/matrixchaincode","version":"v0.0.0-20190924071332-ddf2b42e220f","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package reelection\n\nCopyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n\nCopyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n\nCopyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n\nCopyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n\nCopyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n\nCopyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n\nCopyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or [http://www.opensource.org/licenses/mit-license.php](http://www.opensource.org/licenses/mit-license.php)\n\n## Constants\n\n```go\nconst (\n\tModule = \"换届服务\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tTime_Out_Limit = 2 * time.Second\n\tChanSize       = 10\n)\n```\n\n## Functions\n\n```go\nfunc CheckBlock(block *types.Block) error\n```\n\n```go\nfunc GetAllElectedByHash(hash common.Hash, tp common.RoleType) ([]vm.DepositDetail, error)\n```\n\n```go\nfunc GetAllNativeDataForUpdate(electstate mc.ElectGraph, electonline mc.ElectOnlineStatus, top *mc.TopologyGraph) support.AllNative\n```\n\n```go\nfunc GetCurrentTopology(hash common.Hash, reqtypes common.RoleType) (*mc.TopologyGraph, error)\n```\n\n```go\nfunc GetFound() []vm.DepositDetail\n```\n\n```go\nfunc GetOnlineAlter(offline []common.Address, online []common.Address, electonline mc.ElectOnlineStatus) []mc.Alternative\n```\n\n## Types\n\n```go\ntype ElectReturnInfo struct {\n\tMasterMiner     []mc.ElectNodeInfo\n\tBackUpMiner     []mc.ElectNodeInfo\n\tMasterValidator []mc.ElectNodeInfo\n\tBackUpValidator []mc.ElectNodeInfo\n}\n```\n\n```go\ntype ReElection struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc New(bc *core.BlockChain, random *baseinterface.Random, topNode TopNodeService) (*ReElection, error)\n```\n\n```go\nfunc (p *ReElection) GenElection(state *state.StateDBManage, preBlockHash common.Hash) []common.Elect\n```\n\n```go\nfunc (self *ReElection) GetBroadcastIntervalByHash(hash common.Hash) (*mc.BCIntervalInfo, error)\n```\n\n```go\nfunc (self *ReElection) GetElectConfig(hash common.Hash) (*mc.ElectConfigInfo_All, error)\n```\n\n```go\nfunc (self *ReElection) GetElectGenTimes(hash common.Hash) (*mc.ElectGenTimeStruct, error)\n```\n\n```go\nfunc (self *ReElection) GetElectPlug(hash common.Hash) (baseinterface.ElectionInterface, error)\n```\n\n```go\nfunc (self *ReElection) GetElection(state *state.StateDBManage, hash common.Hash) (*ElectReturnInfo, error)\n```\n\n```go\nfunc (self *ReElection) GetHeaderHashByNumber(hash common.Hash, height uint64) (common.Hash, error)\n```\n\n```go\nfunc (p *ReElection) GetNetTopology(num uint64, version string, parentHash common.Hash, bcInterval *mc.BCIntervalInfo) (*common.NetTopology, []*mc.HD_OnlineConsensusVoteResultMsg)\n```\n\n```go\nfunc (self *ReElection) GetNetTopologyAll(hash common.Hash) (*ElectReturnInfo, error)\n```\n\n```go\nfunc (self *ReElection) GetNextElectNodeInfo(electGraph *mc.ElectGraph, types common.RoleType) (master []mc.ElectNodeInfo, backup []mc.ElectNodeInfo, cand []mc.ElectNodeInfo, err error)\n```\n\n```go\nfunc (self *ReElection) GetNumberByHash(hash common.Hash) (uint64, error)\n```\n\n```go\nfunc (self *ReElection) GetSeed(hash common.Hash) (*big.Int, error)\n```\n得到随机种子\n\n```go\nfunc (self *ReElection) GetTopoChange(hash common.Hash, offline []common.Address, online []common.Address) ([]mc.Alternative, error)\n```\n\n```go\nfunc (self *ReElection) GetViPList(hash common.Hash) ([]mc.VIPConfig, error)\n```\n\n```go\nfunc (self *ReElection) HandleTopGen(hash common.Hash, stateDb *state.StateDBManage) (TopGenStatus, error)\n```\n\n```go\nfunc (self *ReElection) IsMinerTopGenTiming(hash common.Hash) bool\n```\n是不是矿工拓扑生成时间段\n\n```go\nfunc (self *ReElection) IsValidatorTopGenTiming(hash common.Hash) bool\n```\n是不是验证者拓扑生成时间段\n\n```go\nfunc (self *ReElection) LastMinerGenTimeStamp(height uint64, types common.RoleType, hash common.Hash) (uint64, error)\n```\n\n```go\nfunc (self *ReElection) ProduceElectGraphData(block *types.Block, stateDb *state.StateDBManage, readFn core.PreStateReadFn) (interface{}, error)\n```\n\n```go\nfunc (self *ReElection) ProduceElectOnlineStateData(block *types.Block, stateDb *state.StateDBManage, readFn core.PreStateReadFn) (interface{}, error)\n```\n\n```go\nfunc (self *ReElection) ProduceMinHashData(block *types.Block, stateDb *state.StateDBManage, readFn core.PreStateReadFn) (interface{}, error)\n```\n\n```go\nfunc (self *ReElection) ProducePreBroadcastStateData(block *types.Block, stateDb *state.StateDBManage, readFn core.PreStateReadFn) (interface{}, error)\n```\n\n```go\nfunc (self *ReElection) ToGenMinerTop(hash common.Hash) ([]mc.ElectNodeInfo, []mc.ElectNodeInfo, []mc.ElectNodeInfo, error)\n```\n\n```go\nfunc (self *ReElection) ToGenValidatorTop(hash common.Hash, stateDb *state.StateDBManage) ([]mc.ElectNodeInfo, []mc.ElectNodeInfo, []mc.ElectNodeInfo, error)\n```\n\n```go\nfunc (self *ReElection) TopoUpdate(allNative support.AllNative, top *mc.TopologyGraph, hash common.Hash) ([]mc.Alternative, error)\n```\n\n```go\nfunc (self *ReElection) TransferToElectionStu(info *ElectReturnInfo) []common.Elect\n```\n\n```go\nfunc (self *ReElection) TransferToNetTopologyAllStu(info *ElectReturnInfo) *common.NetTopology\n```\n\n```go\nfunc (self *ReElection) TransferToNetTopologyChgStu(alterInfo []mc.Alternative) *common.NetTopology\n```\n\n```go\nfunc (p *ReElection) VerifyElection(header *types.Header, state *state.StateDBManage) error\n```\n\n```go\nfunc (p *ReElection) VerifyNetTopology(version string, header *types.Header, onlineConsensusResults []*mc.HD_OnlineConsensusVoteResultMsg) error\n```\n\n```go\nfunc (p *ReElection) VerifyVrf(header *types.Header) error\n```\n\n```go\ntype TopGenStatus struct {\n\tMastV []mc.ElectNodeInfo\n\tBackV []mc.ElectNodeInfo\n\tCandV []mc.ElectNodeInfo\n\n\tMastM []mc.ElectNodeInfo\n\tBackM []mc.ElectNodeInfo\n\tCandM []mc.ElectNodeInfo\n}\n```\n\n```go\ntype TopNodeService interface {\n\tGetConsensusOnlineResults() []*mc.HD_OnlineConsensusVoteResultMsg\n}\n```\n\n","path":"github.com/chainopen/matrixchaincode/reelection","name":"reelection","synopsis":"","isRedistributable":true}
