validators

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCalcReceiptsMerkleRoot = errors.New("ErrCalcReceiptsMerkleRoot failed in CalcReceiptsMerkleRoot()")
View Source
var ErrCalcStateDiffHash = errors.New("ErrCalcStateDiffHash failed in ErrCalcStateDiffHash()")
View Source
var ErrMismatchedBlockHash = errors.New("ErrMismatchedBlockHash mismatched calculated block hash")
View Source
var ErrMismatchedMetadataHash = errors.New("ErrMismatchedMetadataHash mismatched metadata hash")
View Source
var ErrMismatchedReceiptsRootHash = errors.New("ErrMismatchedReceiptsRootHash receipt merkleRoot is different between results block header and calculated transaction receipts")
View Source
var ErrMismatchedStateDiffHash = errors.New("ErrMismatchedStateDiffHash state diff merkleRoot is different between results block header and calculated transaction receipts")
View Source
var ErrMismatchedTxMerkleRoot = errors.New("ErrMismatchedTxMerkleRoot mismatched transactions merkle root")

Functions

func ValidateBlockHash

func ValidateBlockHash(bvcx *BlockValidatorContext) error

func ValidateReceiptsMerkleRoot

func ValidateReceiptsMerkleRoot(bvcx *BlockValidatorContext) error

func ValidateResultsBlockStateDiffHash

func ValidateResultsBlockStateDiffHash(bvcx *BlockValidatorContext) error

func ValidateTransactionsBlockMerkleRoot

func ValidateTransactionsBlockMerkleRoot(bvcx *BlockValidatorContext) error

func ValidateTransactionsBlockMetadataHash

func ValidateTransactionsBlockMetadataHash(bvcx *BlockValidatorContext) error

Types

type BlockValidatorContext

type BlockValidatorContext struct {
	TransactionsBlock      *protocol.TransactionsBlockContainer
	ResultsBlock           *protocol.ResultsBlockContainer
	CalcReceiptsMerkleRoot func(receipts []*protocol.TransactionReceipt) (primitives.Sha256, error)
	CalcStateDiffHash      func(stateDiffs []*protocol.ContractStateDiff) (primitives.Sha256, error)
	ExpectedBlockHash      primitives.Sha256
}

Jump to

Keyboard shortcuts

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