solo

package module
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsensusSoloImpl

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

ConsensusSoloImpl is the implementation of solo algorithm and it implements the ConsensusEngine interface.

func New

New create ConsensusSoloImpl

func (*ConsensusSoloImpl) CanProposeBlock

func (consensus *ConsensusSoloImpl) CanProposeBlock() bool

CanProposeBlock ...

func (*ConsensusSoloImpl) Close added in v3.0.1

func (consensus *ConsensusSoloImpl) Close() error

Close implements the Close method of ConsensusEngine interface. TODO: implement Close method

func (*ConsensusSoloImpl) GetAllNodeInfos

func (consensus *ConsensusSoloImpl) GetAllNodeInfos() []consensuspb.ConsensusNodeInfo

GetAllNodeInfos get all consensus nodes info known by this node

func (*ConsensusSoloImpl) GetConsensusStateJSON

func (consensus *ConsensusSoloImpl) GetConsensusStateJSON() ([]byte, error)

GetConsensusStateJSON get consensus state for JSON format

func (*ConsensusSoloImpl) GetConsensusType

func (consensus *ConsensusSoloImpl) GetConsensusType() consensuspb.ConsensusType

GetConsensusType get consensus type

func (*ConsensusSoloImpl) GetLastHeight

func (consensus *ConsensusSoloImpl) GetLastHeight() uint64

GetLastHeight get last published height

func (*ConsensusSoloImpl) GetValidators

func (consensus *ConsensusSoloImpl) GetValidators() ([]string, error)

GetValidators get validators for sols

func (*ConsensusSoloImpl) OnMessage

func (consensus *ConsensusSoloImpl) OnMessage(message *msgbus.Message)

OnMessage receive core busmsg and process block

func (*ConsensusSoloImpl) OnQuit

func (consensus *ConsensusSoloImpl) OnQuit()

OnQuit ...

func (*ConsensusSoloImpl) Start

func (consensus *ConsensusSoloImpl) Start() error

Start implements the Init method of ConsensusEngine interface.

func (*ConsensusSoloImpl) Stop

func (consensus *ConsensusSoloImpl) Stop() error

Stop implements the Stop method of ConsensusEngine interface. TODO: implement Stop method

func (*ConsensusSoloImpl) VerifyBlockSignatures

func (consensus *ConsensusSoloImpl) VerifyBlockSignatures(block *common.Block) error

VerifyBlockSignatures on impl for sols

type SoloState

type SoloState struct {
	Id             string
	ChainId        string
	VerifyingBlock *common.Block
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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