validation

package
v1.4.0-rc1.0...-d0bad2e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 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 AppInitiatedPurgeUpdate

type AppInitiatedPurgeUpdate struct {
	CompositeKey *privacyenabledstate.HashedCompositeKey
	Version      *version.Height
}

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, []*AppInitiatedPurgeUpdate, []*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 {
	TxIDFromChannelHeader string
	ValidationCode        peer.TxValidationCode
	TxType                common.HeaderType
	ChaincodeID           *peer.ChaincodeID
	ChaincodeEventData    []byte
	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