blkverify

package
v0.0.0-...-c3c44a6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 24 Imported by: 0

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

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrParamIsNil = errors.New("param is nil")
	ErrExistVote  = errors.New("vote is existed")
)

Functions

This section is empty.

Types

type BlockVerify

type BlockVerify struct {
	// contains filtered or unexported fields
}

func NewBlockVerify

func NewBlockVerify(matrix Matrix) (*BlockVerify, error)

func (*BlockVerify) Close

func (self *BlockVerify) Close()

type Matrix

type Matrix interface {
	HD() *msgsend.HD
	BlockChain() *core.BlockChain
	TxPool() *core.TxPoolManager //Y
	SignHelper() *signhelper.SignHelper
	ReElection() *reelection.ReElection
	EventMux() *event.TypeMux
	Random() *baseinterface.Random
	ChainDb() mandb.Database
	ManBlkDeal() *blkmanage.ManBlkManage
}

type Process

type Process struct {
	// contains filtered or unexported fields
}

func (*Process) AddLocalReq

func (p *Process) AddLocalReq(localReq *mc.LocalBlockVerifyConsensusReq)

func (*Process) AddReq

func (p *Process) AddReq(reqMsg *mc.HD_BlkConsensusReqMsg)

func (*Process) AddVerifiedBlock

func (p *Process) AddVerifiedBlock(block *verifiedBlock)

func (*Process) ChainDb

func (p *Process) ChainDb() mandb.Database

func (*Process) Close

func (p *Process) Close()

func (*Process) HandleVote

func (p *Process) HandleVote(signHash common.Hash, vote common.Signature, from common.Address)

func (*Process) ProcessDPOSOnce

func (p *Process) ProcessDPOSOnce()

func (*Process) ProcessRecoveryMsg

func (p *Process) ProcessRecoveryMsg(msg *mc.RecoveryStateMsg)

func (*Process) ProcessTxsAcquireTimeOut

func (p *Process) ProcessTxsAcquireTimeOut(seq int)

func (*Process) SetLeaderInfo

func (p *Process) SetLeaderInfo(info *mc.LeaderChangeNotify)

func (*Process) StartRunning

func (p *Process) StartRunning(role common.RoleType)

func (*Process) StartVerifyTxsAndState

func (p *Process) StartVerifyTxsAndState(result *core.RetChan)

type ProcessManage

type ProcessManage struct {
	// contains filtered or unexported fields
}

func NewProcessManage

func NewProcessManage(matrix Matrix) *ProcessManage

func (*ProcessManage) AddVerifiedBlock

func (pm *ProcessManage) AddVerifiedBlock(block *verifiedBlock)

func (*ProcessManage) GetCurrentProcess

func (pm *ProcessManage) GetCurrentProcess() *Process

func (*ProcessManage) GetProcess

func (pm *ProcessManage) GetProcess(number uint64) (*Process, error)

func (*ProcessManage) SetCurNumber

func (pm *ProcessManage) SetCurNumber(number uint64, superSeq uint64)

type State

type State uint16
const (
	StateIdle State = iota
	StateStart
	StateReqVerify
	StateTxsVerify
	StateDPOSVerify
	StateEnd
)

func (State) String

func (s State) String() string

type VerifiedBlockIndex

type VerifiedBlockIndex struct {
	Last      uint8
	Capacity  uint8
	IndexRing []common.Hash
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL