fabric: github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/validator/internal Index | Files

package internal

import "github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/validator/internal"

Index

Package Files

tx_ops_preparation.go val.go

type Block Uses

type Block struct {
    Num uint64
    Txs []*Transaction
}

Block is used to used to hold the information from its proto format to a structure that is more suitable/friendly for validation

type PubAndHashUpdates Uses

type PubAndHashUpdates struct {
    PubUpdates  *privacyenabledstate.PubUpdateBatch
    HashUpdates *privacyenabledstate.HashedUpdateBatch
}

PubAndHashUpdates encapsulates public and hash updates. The intended use of this to hold the updates that are to be applied to the statedb as a result of the block commit

func NewPubAndHashUpdates Uses

func NewPubAndHashUpdates() *PubAndHashUpdates

NewPubAndHashUpdates constructs an empty PubAndHashUpdates

func (*PubAndHashUpdates) ApplyWriteSet Uses

func (u *PubAndHashUpdates) ApplyWriteSet(
    txRWSet *rwsetutil.TxRwSet,
    txHeight *version.Height,
    db privacyenabledstate.DB,
    containsPostOrderWrites bool,
) error

ApplyWriteSet adds (or deletes) the key/values present in the write set to the PubAndHashUpdates

type Transaction Uses

type Transaction struct {
    IndexInBlock            int
    ID                      string
    RWSet                   *rwsetutil.TxRwSet
    ValidationCode          peer.TxValidationCode
    ContainsPostOrderWrites bool
}

Transaction is used to hold the information from its proto format to a structure that is more suitable/friendly for validation

func (*Transaction) ContainsPvtWrites Uses

func (t *Transaction) ContainsPvtWrites() bool

ContainsPvtWrites returns true if this transaction is not limited to affecting the public data only

func (*Transaction) RetrieveHash Uses

func (t *Transaction) RetrieveHash(ns string, coll string) []byte

RetrieveHash returns the hash of the private write-set present in the public data for a given namespace-collection

type Validator Uses

type Validator interface {
    ValidateAndPrepareBatch(block *Block, doMVCCValidation bool) (*PubAndHashUpdates, error)
}

Validator is supposed to validate the transactions based on public data and hashes present in a block and returns a batch that should be used to update the state

Package internal imports 8 packages (graph) and is imported by 2 packages. Updated 2019-11-20. Refresh now. Tools for package owners.