Documentation ¶
Index ¶
- Variables
- func NewBlockVerifier(config BlockVerifierConfig, log protocol.Logger) (protocol.BlockVerifier, error)
- type BlockVerifierConfig
- type BlockVerifierImpl
- func (v *BlockVerifierImpl) Module() string
- func (v *BlockVerifierImpl) OnMessage(msg *msgbus.Message)
- func (v *BlockVerifierImpl) OnQuit()
- func (v *BlockVerifierImpl) VerifyBlock(block *commonpb.Block, mode protocol.VerifyMode) (err error)
- func (v *BlockVerifierImpl) VerifyBlockSync(block *commonpb.Block, mode protocol.VerifyMode) (*consensuspb.VerifyResult, error)
- func (v *BlockVerifierImpl) VerifyBlockWithRwSets(block *commonpb.Block, rwsets []*commonpb.TxRWSet, mode protocol.VerifyMode) (err error)
- func (v *BlockVerifierImpl) Watch(chainConfig *chainConfConfig.ChainConfig) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ModuleNameCore = "Core"
Functions ¶
func NewBlockVerifier ¶
func NewBlockVerifier(config BlockVerifierConfig, log protocol.Logger) (protocol.BlockVerifier, error)
Types ¶
type BlockVerifierConfig ¶
type BlockVerifierConfig struct { ChainId string MsgBus msgbus.MessageBus SnapshotManager protocol.SnapshotManager BlockchainStore protocol.BlockchainStore LedgerCache protocol.LedgerCache TxScheduler protocol.TxScheduler ProposedCache protocol.ProposalCache ChainConf protocol.ChainConf AC protocol.AccessControlProvider TxPool protocol.TxPool VmMgr protocol.VmManager StoreHelper config.StoreHelper NetService protocol.NetService TxFilter protocol.TxFilter }
type BlockVerifierImpl ¶
type BlockVerifierImpl struct {
// contains filtered or unexported fields
}
BlockVerifierImpl implements BlockVerifier interface. Verify block and transactions. nolint: structcheck,unused
func (*BlockVerifierImpl) Module ¶
func (v *BlockVerifierImpl) Module() string
func (*BlockVerifierImpl) OnMessage ¶
func (v *BlockVerifierImpl) OnMessage(msg *msgbus.Message)
OnMessage contract event data is a []string, hexToString(proto.Marshal(data))
func (*BlockVerifierImpl) OnQuit ¶
func (v *BlockVerifierImpl) OnQuit()
func (*BlockVerifierImpl) VerifyBlock ¶
func (v *BlockVerifierImpl) VerifyBlock(block *commonpb.Block, mode protocol.VerifyMode) (err error)
VerifyBlock to check if block is valid
func (*BlockVerifierImpl) VerifyBlockSync ¶
func (v *BlockVerifierImpl) VerifyBlockSync(block *commonpb.Block, mode protocol.VerifyMode) (*consensuspb.VerifyResult, error)
VerifyBlockSync only maxbft use this method
func (*BlockVerifierImpl) VerifyBlockWithRwSets ¶
func (v *BlockVerifierImpl) VerifyBlockWithRwSets(block *commonpb.Block, rwsets []*commonpb.TxRWSet, mode protocol.VerifyMode) (err error)
VerifyBlockWithRwSets to check if block is valid
func (*BlockVerifierImpl) Watch ¶
func (v *BlockVerifierImpl) Watch(chainConfig *chainConfConfig.ChainConfig) error
Click to show internal directories.
Click to hide internal directories.