consensus

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterConsensusProvider

func RegisterConsensusProvider(t consensusPb.ConsensusType, f Provider)

func VerifyBlockSignatures

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

VerifyBlockSignatures verifies whether the signatures in block is qulified with the consensus algorithm. It should return nil error when verify successfully, and return corresponding error when failed.

Types

type Provider

type Provider func(config *utils.ConsensusImplConfig) (protocol.ConsensusEngine, error)

func GetConsensusProvider

func GetConsensusProvider(t consensusPb.ConsensusType) Provider

Jump to

Keyboard shortcuts

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