Documentation ¶
Index ¶
- type ConsensusSoloImpl
- func (consensus *ConsensusSoloImpl) CanProposeBlock() bool
- func (consensus *ConsensusSoloImpl) Close() error
- func (consensus *ConsensusSoloImpl) GetAllNodeInfos() []consensuspb.ConsensusNodeInfo
- func (consensus *ConsensusSoloImpl) GetConsensusStateJSON() ([]byte, error)
- func (consensus *ConsensusSoloImpl) GetConsensusType() consensuspb.ConsensusType
- func (consensus *ConsensusSoloImpl) GetLastHeight() uint64
- func (consensus *ConsensusSoloImpl) GetValidators() ([]string, error)
- func (consensus *ConsensusSoloImpl) OnMessage(message *msgbus.Message)
- func (consensus *ConsensusSoloImpl) OnQuit()
- func (consensus *ConsensusSoloImpl) Start() error
- func (consensus *ConsensusSoloImpl) Stop() error
- func (consensus *ConsensusSoloImpl) VerifyBlockSignatures(block *common.Block) error
- type SoloState
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 ¶
func New(config *consensusUtils.ConsensusImplConfig) (*ConsensusSoloImpl, error)
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) 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