accuser

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccuseInterval int64 //accuse 间隔 单位s
)

Functions

This section is empty.

Types

type Accuser

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

Accuser 发起accuse的结构体

func NewAccuser

func NewAccuser(nodeInfo cluster.NodeInfo, signer *crypto.SecureSigner,
	pm *cluster.PeerManager) *Accuser

NewAccuser 新建一个Accuser对象并返回

func (*Accuser) OnNewCommitted

func (ac *Accuser) OnNewCommitted(newTop *pb.BlockPack)

OnNewCommitted 新区块commit之后的回调处理

func (*Accuser) OnTermChange

func (ac *Accuser) OnTermChange(newTerm int64)

OnTermChange term自增之后的回调处理

func (*Accuser) Run

func (ac *Accuser) Run(ctx context.Context)

Run Accuser循环处理accuse并做区块间隔检测

func (*Accuser) TriggerByBlockStore

func (ac *Accuser) TriggerByBlockStore(term int64)

TriggerByBlockStore blockstore发起accuse

func (*Accuser) TriggerByTxStore

func (ac *Accuser) TriggerByTxStore(term int64)

TriggerByTxStore txstore发起accuse

Jump to

Keyboard shortcuts

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