valinternal

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2018 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

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 InternalValidator

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

InternalValidator 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

type PubAndHashUpdates

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

func NewPubAndHashUpdates() *PubAndHashUpdates

NewPubAndHashUpdates constructs an empty PubAndHashUpdates

func (*PubAndHashUpdates) ApplyWriteSet

func (u *PubAndHashUpdates) ApplyWriteSet(txRWSet *rwsetutil.TxRwSet, txHeight *version.Height)

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

type Transaction

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

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

func (*Transaction) ContainsPvtWrites

func (t *Transaction) ContainsPvtWrites() bool

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

func (*Transaction) RetrieveHash

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

Jump to

Keyboard shortcuts

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