Documentation ¶
Index ¶
- func VerifyBlockSignatures(chainConf protocol.ChainConf, ac protocol.AccessControlProvider, ...) error
- type Maxbft
- func (m *Maxbft) Close() error
- func (m *Maxbft) GetAllNodeInfos() []consensus.ConsensusNodeInfo
- func (m *Maxbft) GetConsensusStateJSON() ([]byte, error)
- func (m *Maxbft) GetConsensusType() consensus.ConsensusType
- func (m *Maxbft) GetLastHeight() uint64
- func (m *Maxbft) GetValidators() ([]string, error)
- func (m *Maxbft) OnMessage(message *msgbus.Message)
- func (m *Maxbft) OnQuit()
- func (m *Maxbft) Start() error
- func (m *Maxbft) Stop() error
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 ¶
func New(cfg *consensusUtils.ConsensusImplConfig) (*Maxbft, error)
New initials and returns a new Maxbft object
func (*Maxbft) GetAllNodeInfos ¶
func (m *Maxbft) GetAllNodeInfos() []consensus.ConsensusNodeInfo
GetAllNodeInfos get consensus node infos
func (*Maxbft) GetConsensusStateJSON ¶
GetConsensusStateJSON get consensus state
func (*Maxbft) GetConsensusType ¶
func (m *Maxbft) GetConsensusType() consensus.ConsensusType
GetConsensusType get consensus type
func (*Maxbft) GetLastHeight ¶
GetLastHeight get latest consensus height
func (*Maxbft) GetValidators ¶
GetValidators get validators
func (*Maxbft) OnMessage ¶
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 ¶
Start was called by blockChain after the chain configurations were modified, we encapsulate the actual startup behavior to avoid repeated startup of MaxBft