verifier

package
v0.0.0-...-bda353b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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