Versions in this module Expand all Collapse all v0 v0.5.11 Sep 22, 2020 v0.5.6 Jun 17, 2020 Changes in this version + var GetNodes func() map[string]string = func() map[string]string + var NodesCount int + var SelfAddress string + func GetBlockForMining(chain uint64) *core.StBlock + func GetHashPowerOfBlocks(chain uint64) uint64 + func GetMyHashPower(chain uint64) uint64 + func GetSyncBlock(chain, index uint64) []byte + func GetTransList(chain uint64, key []byte) []core.Hash + func Init() + func SaveBlockReliability(chain uint64, key []byte, rb TReliability) + func SaveBlockRunStat(chain uint64, key []byte, rb BlockRunStat) + func SaveIDBlocks(chain, index uint64, ib IDBlocks) + func SaveTransList(chain uint64, key []byte, value []core.Hash) + func SetSyncBlock(chain, index uint64, key []byte) + type BlockRunStat struct + RollbackCount int + RollbackTime int64 + RunSuccessCount int + RunTimes int + SelectedCount uint64 + func ReadBlockRunStat(chain uint64, key []byte) (cl BlockRunStat) + type IDBlocks struct + Items []ItemBlock + func ReadIDBlocks(chain, index uint64) (ib IDBlocks) + type InternalPlugin struct + func (p *InternalPlugin) Cleanup(n libp2p.Network) + func (p *InternalPlugin) PeerConnect(s libp2p.Session) + func (p *InternalPlugin) PeerDisconnect(s libp2p.Session) + func (p *InternalPlugin) Startup(n libp2p.Network) + type ItemBlock struct + HashPower uint64 + Key core.Hash + type MsgPlugin struct + func (p *MsgPlugin) Cleanup(n libp2p.Network) + func (p *MsgPlugin) Receive(ctx libp2p.Event) error + func (p *MsgPlugin) Startup(n libp2p.Network) + type NATTPlugin struct + Nodes map[string]libp2p.Session + func (p *NATTPlugin) GetNodes() map[string]string + func (p *NATTPlugin) PeerConnect(s libp2p.Session) + func (p *NATTPlugin) PeerDisconnect(s libp2p.Session) + func (p *NATTPlugin) Receive(ctx libp2p.Event) error + func (p *NATTPlugin) Startup(n libp2p.Network) + type SyncPlugin struct + func (p *SyncPlugin) Receive(ctx libp2p.Event) error + func (p *SyncPlugin) Startup(n libp2p.Network) + type TReliability struct + Admin bool + HashPower uint64 + Index uint64 + Key core.Hash + LeftChild core.Hash + Parent core.Hash + Previous core.Hash + Producer core.Address + Ready bool + RightChild core.Hash + Time uint64 + TransListHash core.Hash + func ReadBlockReliability(chain uint64, key []byte) TReliability + func (r *TReliability) Recalculation(chain uint64) + func (r TReliability) Cmp(y TReliability) int