Versions in this module Expand all Collapse all v1 v1.0.2 Jan 27, 2022 v1.0.1 Dec 1, 2021 Changes in this version + var MinerAddressErr = errors.New("Block's proposer must be equal to its address.") + func NewSingleConsensus(cCtx cctx.ConsensusCtx, cCfg def.ConsensusConfig) base.ConsensusImplInterface + type SingleConfig struct + Miner string + Period int64 + Version int64 + type SingleConsensus struct + func (s *SingleConsensus) CalculateBlock(block cctx.BlockInterface) error + func (s *SingleConsensus) CheckMinerMatch(ctx xcontext.XContext, block cctx.BlockInterface) (bool, error) + func (s *SingleConsensus) CompeteMaster(height int64) (bool, bool, error) + func (s *SingleConsensus) GetConsensusStatus() (base.ConsensusStatus, error) + func (s *SingleConsensus) ParseConsensusStorage(block cctx.BlockInterface) (interface{}, error) + func (s *SingleConsensus) ProcessBeforeMiner(timestamp int64) ([]byte, []byte, error) + func (s *SingleConsensus) ProcessConfirmBlock(block cctx.BlockInterface) error + func (s *SingleConsensus) Start() error + func (s *SingleConsensus) Stop() error + type SingleStatus struct + func (s *SingleStatus) GetConsensusBeginInfo() int64 + func (s *SingleStatus) GetConsensusName() string + func (s *SingleStatus) GetCurrentTerm() int64 + func (s *SingleStatus) GetCurrentValidatorsInfo() []byte + func (s *SingleStatus) GetStepConsensusIndex() int + func (s *SingleStatus) GetVersion() int64 + type ValidatorsInfo struct + Validators []string