Documentation ¶
Overview ¶
Copyright (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
Copyright (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
Copyright (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
Copyright (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
Copyright (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
Copyright (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
Copyright (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
Copyright (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
Index ¶
- Variables
- type Backend
- type BlockGenor
- type PowPool
- func (self *PowPool) AddMinerResult(blockHash common.Hash, diff *big.Int, minerResult *mc.HD_MiningRspMsg) error
- func (self *PowPool) DelOneResult(blockHash common.Hash, diff *big.Int, from common.Address) error
- func (self *PowPool) GetMinerResults(blockHash common.Hash, diff *big.Int) ([]*mc.HD_MiningRspMsg, error)
- type Process
- func (p *Process) AddBroadcastMinerResult(result *mc.HD_BroadcastMiningRspMsg)
- func (p *Process) AddConsensusBlock(block *mc.BlockLocalVerifyOK)
- func (p *Process) AddInsertBlockInfo(blockInsert *mc.HD_BlockInsertNotify)
- func (p *Process) AddMinerResult(minerResult *mc.HD_MiningRspMsg)
- func (p *Process) Close()
- func (p *Process) ProcessFullBlockReq(req *mc.HD_FullBlockReqMsg)
- func (p *Process) ProcessFullBlockRsp(rsp *mc.HD_FullBlockRspMsg)
- func (p *Process) ProcessRecoveryMsg(msg *mc.RecoveryStateMsg)
- func (p *Process) ReInit()
- func (p *Process) ReInitNextLeader()
- func (p *Process) SetCurLeader(leader common.Address, consensusTurn mc.ConsensusTurnInfo)
- func (p *Process) SetNextLeader(preLeader common.Address, leader common.Address)
- func (p *Process) StartRunning(role common.RoleType, bcInterval *mc.BCIntervalInfo)
- type ProcessManage
- func (pm *ProcessManage) GetCurNumber() uint64
- func (pm *ProcessManage) GetCurrentProcess() *Process
- func (pm *ProcessManage) GetProcess(number uint64) (*Process, error)
- func (pm *ProcessManage) GetProcessAndPreProcess(number uint64) (*Process, *Process, error)
- func (pm *ProcessManage) SetCurNumber(number uint64, superSeq uint64)
- type State
- type VrfMsg
Constants ¶
This section is empty.
Variables ¶
var ( MinerResultError = errors.New("MinerResult Error") ParaNull = errors.New("Para is null ") HaveNotOKResultError = errors.New("have no satisfy miner result") HaveNoGenBlockError = errors.New("have no gen block data") HashNoSignNotMatchError = errors.New("hash without sign not match") )
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { BlockChain() *core.BlockChain TxPool() *core.TxPoolManager //Y EventMux() *event.TypeMux SignHelper() *signhelper.SignHelper HD() *msgsend.HD ReElection() *reelection.ReElection FetcherNotify(hash common.Hash, number uint64, addr common.Address) OLConsensus() *olconsensus.TopNodeService Random() *baseinterface.Random ManBlkDeal() *blkmanage.ManBlkManage }
type BlockGenor ¶
type BlockGenor struct {
// contains filtered or unexported fields
}
func New ¶
func New(man Backend) (*BlockGenor, error)
func (*BlockGenor) Close ¶
func (self *BlockGenor) Close()
type PowPool ¶
type PowPool struct {
// contains filtered or unexported fields
}
///////////////////////////////////////////////////////////////////////////////////////// 协程安全投挖矿结果池
func NewPowPool ¶
func (*PowPool) AddMinerResult ¶
func (*PowPool) DelOneResult ¶
func (*PowPool) GetMinerResults ¶
type Process ¶
type Process struct { FullBlockReqCache *common.ReuseMsgController // contains filtered or unexported fields }
func (*Process) AddBroadcastMinerResult ¶
func (p *Process) AddBroadcastMinerResult(result *mc.HD_BroadcastMiningRspMsg)
func (*Process) AddConsensusBlock ¶
func (p *Process) AddConsensusBlock(block *mc.BlockLocalVerifyOK)
func (*Process) AddInsertBlockInfo ¶
func (p *Process) AddInsertBlockInfo(blockInsert *mc.HD_BlockInsertNotify)
func (*Process) AddMinerResult ¶
func (p *Process) AddMinerResult(minerResult *mc.HD_MiningRspMsg)
func (*Process) ProcessFullBlockReq ¶
func (p *Process) ProcessFullBlockReq(req *mc.HD_FullBlockReqMsg)
func (*Process) ProcessFullBlockRsp ¶
func (p *Process) ProcessFullBlockRsp(rsp *mc.HD_FullBlockRspMsg)
func (*Process) ProcessRecoveryMsg ¶
func (p *Process) ProcessRecoveryMsg(msg *mc.RecoveryStateMsg)
func (*Process) ReInitNextLeader ¶
func (p *Process) ReInitNextLeader()
func (*Process) SetCurLeader ¶
func (p *Process) SetCurLeader(leader common.Address, consensusTurn mc.ConsensusTurnInfo)
func (*Process) SetNextLeader ¶
func (*Process) StartRunning ¶
func (p *Process) StartRunning(role common.RoleType, bcInterval *mc.BCIntervalInfo)
type ProcessManage ¶
type ProcessManage struct {
// contains filtered or unexported fields
}
func NewProcessManage ¶
func NewProcessManage(matrix Backend) *ProcessManage
func (*ProcessManage) GetCurNumber ¶
func (pm *ProcessManage) GetCurNumber() uint64
func (*ProcessManage) GetCurrentProcess ¶
func (pm *ProcessManage) GetCurrentProcess() *Process
func (*ProcessManage) GetProcess ¶
func (pm *ProcessManage) GetProcess(number uint64) (*Process, error)
func (*ProcessManage) GetProcessAndPreProcess ¶
func (pm *ProcessManage) GetProcessAndPreProcess(number uint64) (*Process, *Process, error)
func (*ProcessManage) SetCurNumber ¶
func (pm *ProcessManage) SetCurNumber(number uint64, superSeq uint64)