utils

package
v0.0.0-...-8d456d7 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const InvalidIndex = math.MaxUint32

Variables

This section is empty.

Functions

func AddConsensusArgstoBlock

func AddConsensusArgstoBlock(block *common.Block, level uint64, txRWSet *common.TxRWSet) error

AddConsensusArgstoBlock add consensus args to block

func AddQCtoBlock

func AddQCtoBlock(block *common.Block, qc []byte) error

AddQCtoBlock add qc to block

func GetConsensusArgsFromBlock

func GetConsensusArgsFromBlock(block *common.Block) (*consensus.BlockHeaderConsensusArgs, error)

GetConsensusArgsFromBlock get args from block

func GetLevelFromBlock

func GetLevelFromBlock(block *common.Block) (uint64, error)

GetLevelFromBlock get level from block

func GetLevelFromQc

func GetLevelFromQc(block *common.Block) (uint64, error)

GetLevelFromQc get level from qc

func GetQCFromBlock

func GetQCFromBlock(block *common.Block) []byte

GetQCFromBlock get qc from block

func SignBlock

func SignBlock(block *common.Block, hashType string, signer protocol.SigningMember) error

SignBlock signs the block using given key

func SignConsensusMsg

func SignConsensusMsg(msg *maxbftpb.ConsensusMsg, hashType string,
	signer protocol.SigningMember) error

SignConsensusMsg signs the consensus msg using given key

func VerifyConsensusMsgSign

func VerifyConsensusMsgSign(msg *maxbftpb.ConsensusMsg, ac protocol.AccessControlProvider) error

VerifyConsensusMsgSign verify the consensus msg sign

func VerifyDataSign

func VerifyDataSign(data []byte, signEnrty *common.EndorsementEntry,
	ac protocol.AccessControlProvider) error

VerifyDataSign verify the data with EndorsementEntry, ac, org

func VerifyTimeConfig

func VerifyTimeConfig(detail string, t uint64) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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