validation

package
v0.0.0-...-7a628bf Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitBatchPreparer

type CommitBatchPreparer struct {
	// contains filtered or unexported fields
}

CommitBatchPreparer performs validation and prepares the final batch that is to be committed to the statedb

func NewCommitBatchPreparer

func NewCommitBatchPreparer(
	postOrderSimulatorProvider PostOrderSimulatorProvider,
	db *privacyenabledstate.DB,
	customTxProcessors map[common.HeaderType]ledger.CustomTxProcessor,
	hashFunc rwsetutil.HashFunc,
) *CommitBatchPreparer

NewCommitBatchPreparer constructs a validator that internally manages statebased validator and in addition handles the tasks that are agnostic to a particular validation scheme such as parsing the block and handling the pvt data

func (*CommitBatchPreparer) ValidateAndPrepareBatch

func (p *CommitBatchPreparer) ValidateAndPrepareBatch(blockAndPvtdata *ledger.BlockAndPvtData,
	doMVCCValidation bool) (*privacyenabledstate.UpdateBatch, []*TxStatInfo, error)

ValidateAndPrepareBatch performs validation of transactions in the block and prepares the batch of final writes

type PostOrderSimulatorProvider

type PostOrderSimulatorProvider interface {
	NewTxSimulator(txid string) (ledger.TxSimulator, error)
}

PostOrderSimulatorProvider provides access to a tx simulator for executing post order non-endorser transactions

type TxStatInfo

type TxStatInfo struct {
	ValidationCode peer.TxValidationCode
	TxType         common.HeaderType
	ChaincodeID    *peer.ChaincodeID
	NumCollections int
}

TxStatInfo encapsulates information about a transaction

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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