pbftserver

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2019 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Start int = iota
	Stop
	Switch

	ServerWait    = 5
	BlockSleepMax = 5
)

Variables

This section is empty.

Functions

func DelayStop

func DelayStop(id uint64, ss *PbftServerMgr)

Types

type PbftServerMgr

type PbftServerMgr struct {
	Agent types.PbftAgentProxy

	Close bool
	// contains filtered or unexported fields
}

func NewPbftServerMgr

func NewPbftServerMgr(pk *ecdsa.PublicKey, priv *ecdsa.PrivateKey, agent types.PbftAgentProxy) *PbftServerMgr

func (*PbftServerMgr) Broadcast

func (ss *PbftServerMgr) Broadcast(height *big.Int)

func (*PbftServerMgr) CheckMsg

func (ss *PbftServerMgr) CheckMsg(msg *consensus.RequestMsg) (*types.PbftSign, error)

func (*PbftServerMgr) Finish

func (ss *PbftServerMgr) Finish() error

func (*PbftServerMgr) GetCommitteeStatus

func (ss *PbftServerMgr) GetCommitteeStatus(committeeID *big.Int) map[string]interface{}

func (*PbftServerMgr) GetRequest

func (ss *PbftServerMgr) GetRequest(id *big.Int) (*consensus.RequestMsg, error)

func (*PbftServerMgr) InsertBlock

func (ss *PbftServerMgr) InsertBlock(msg *consensus.PrePrepareMsg) bool

func (*PbftServerMgr) Notify

func (ss *PbftServerMgr) Notify(id *big.Int, action int) error

func (*PbftServerMgr) PutCommittee

func (ss *PbftServerMgr) PutCommittee(committeeInfo *types.CommitteeInfo) error

func (*PbftServerMgr) PutNodes

func (ss *PbftServerMgr) PutNodes(id *big.Int, nodes []*types.CommitteeNode) error

func (*PbftServerMgr) RepeatFetch

func (ss *PbftServerMgr) RepeatFetch(id *big.Int, height int64)

func (*PbftServerMgr) ReplyResult

func (ss *PbftServerMgr) ReplyResult(msg *consensus.RequestMsg, signs []*types.PbftSign, res uint) bool

func (*PbftServerMgr) SetCommitteeStop

func (ss *PbftServerMgr) SetCommitteeStop(committeeId *big.Int, stop uint64) error

func (*PbftServerMgr) SignMsg

func (ss *PbftServerMgr) SignMsg(h int64, res uint) *consensus.SignedVoteMsg

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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