consensus_maxbft

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: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyBlockSignatures

func VerifyBlockSignatures(chainConf protocol.ChainConf, ac protocol.AccessControlProvider,
	store protocol.BlockchainStore, block *common.Block, ledger protocol.LedgerCache) error

VerifyBlockSignatures Implement callback functions for core modules is used for consensus checking of the block which receive block from the sync module.

Types

type Maxbft

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

Maxbft defines consensus module object used by blockChain

func New

New initials and returns a new Maxbft object

func (*Maxbft) Close added in v3.0.1

func (m *Maxbft) Close() error

Close the consensus-engine

func (*Maxbft) GetAllNodeInfos

func (m *Maxbft) GetAllNodeInfos() []consensus.ConsensusNodeInfo

GetAllNodeInfos get consensus node infos

func (*Maxbft) GetConsensusStateJSON

func (m *Maxbft) GetConsensusStateJSON() ([]byte, error)

GetConsensusStateJSON get consensus state

func (*Maxbft) GetConsensusType

func (m *Maxbft) GetConsensusType() consensus.ConsensusType

GetConsensusType get consensus type

func (*Maxbft) GetLastHeight

func (m *Maxbft) GetLastHeight() uint64

GetLastHeight get latest consensus height

func (*Maxbft) GetValidators

func (m *Maxbft) GetValidators() ([]string, error)

GetValidators get validators

func (*Maxbft) OnMessage

func (m *Maxbft) OnMessage(message *msgbus.Message)

OnMessage The message received from msgBus is distributed to the consensus engine for processing

func (*Maxbft) OnQuit

func (m *Maxbft) OnQuit()

OnQuit implements the Subscriber interface in message bus

func (*Maxbft) Start

func (m *Maxbft) Start() error

Start was called by blockChain after the chain configurations were modified, we encapsulate the actual startup behavior to avoid repeated startup of MaxBft

func (*Maxbft) Stop

func (m *Maxbft) Stop() error

Stop was called by blockChain after the chain configurations were modified, we do nothing here to give control of the consensus module to itself

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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