Versions in this module Expand all Collapse all v1 v1.1.4 May 17, 2019 v1.1.3 Apr 11, 2019 v1.1.2 Mar 8, 2019 v1.1.1 Feb 19, 2019 v1.1.0 Nov 15, 2018 v1.0.0 Nov 15, 2018 Changes in this version + func Normalize(probVal []Stf) []pnormalized + func Sample1NodesInValNodes(probnormalized []pnormalized, rand01 float64) string + func WriteWithFileWrite(name, content string) + type CandidateInfo struct + Address common.Address + Deposit uint64 + TPS uint64 + UpTime uint64 + type ElectEventType string + type ElectMMSub struct + MasterMinerReElectionReqMsgCH chan *mc.MasterMinerReElectionReqMsg + MasterMinerReElectionReqMsgSub event.Subscription + type ElectMVSub struct + MasterValidatorReElectionReqMsgCH chan *mc.MasterValidatorReElectionReqMsg + MasterValidatorReElectionReqMsgSub event.Subscription + type ElectionResultInfo struct + Address common.Address + Stake uint64 + type Elector struct + EleMMRs chan *mc.MasterMinerReElectionRsp + EleMMSub ElectMMSub + EleMVRs chan *mc.MasterValidatorReElectionRsq + EleMVSub ElectMVSub + Engine func(probVal []Stf, seed int64, M int, P int, J int) ([]Strallyint, []Strallyint, []Strallyint) + J int + M int + MaxSample int + N int + P int + func NewEle() *Elector + func (Ele *Elector) ChoiceEngine(flag int) + func (Ele *Elector) CommbineFundNodesAndPricipal(probVal []Stf, probFund []Stf, PricipalValNodes []Strallyint, ...) []Strallyint + func (Ele *Elector) EleServer() + func (Ele *Elector) Listen() + func (Ele *Elector) MinerNodesSelected(probVal []Stf, seed int64, Ms int) ([]Strallyint, []Strallyint) + func (Ele *Elector) Post() + func (Ele *Elector) PrimarylistUpdate(Q0, Q1, Q2 []mc.TopologyNodeInfo, online mc.TopologyNodeInfo, flag int) ([]mc.TopologyNodeInfo, []mc.TopologyNodeInfo, []mc.TopologyNodeInfo) + func (Ele *Elector) SampleMPlusPNodes(probnormalized []pnormalized, seed int64) ([]Strallyint, []Strallyint, []Strallyint) + func (Ele *Elector) SampleMinerNodes(probnormalized []pnormalized, seed int64, Ms int) ([]Strallyint, []Strallyint) + func (Ele *Elector) ToPoUpdate(Q0, Q1, Q2 []mc.TopologyNodeInfo, nettopo mc.TopologyGraph, ...) []mc.Alternative + func (Ele *Elector) ValNodesSelected(probVal []Stf, seed int64, M int, P int, J int) ([]Strallyint, []Strallyint, []Strallyint) + type Mynode struct + Nodeid string + Stk float64 + Tps int + Uptime int + type Self struct + Coef_stk float64 + Coef_tps float64 + func (self *Self) Last_Time() float64 + func (self *Self) TPS_POWER() float64 + type Stf struct + Flot float64 + Str string + func CalcAllValueFunction(nodelist []vm.DepositDetail) []Stf + type Strallyint struct + Nodeid string + Value int + func CalcRemainingNodesVotes(RemainingProbNormalizedNodes []Strallyint) []Strallyint