txvalidator

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 31 Imported by: ? 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 ApplicationCapabilities

type ApplicationCapabilities interface {
	channelconfig.ApplicationCapabilities
}

type CapabilityProvider

type CapabilityProvider interface {
	Capabilities() channelconfig.ApplicationCapabilities
}

type Context

type Context struct {
	Seq       int
	Envelope  []byte
	TxID      string
	Channel   string
	VSCCName  string
	Policy    []byte
	Namespace string
	Block     *common.Block
}

func (Context) String

func (c Context) String() string

type MapBasedPluginMapper

type MapBasedPluginMapper map[string]validation.PluginFactory

func (MapBasedPluginMapper) PluginFactoryByName

func (m MapBasedPluginMapper) PluginFactoryByName(name PluginName) validation.PluginFactory

type PluginMapper

type PluginMapper interface {
	PluginFactoryByName(name PluginName) validation.PluginFactory
}

type PluginName

type PluginName string

type PluginValidator

type PluginValidator struct {
	sync.Mutex

	PluginMapper
	QueryExecutorCreator
	msp.IdentityDeserializer
	// contains filtered or unexported fields
}

func NewPluginValidator

func NewPluginValidator(pm PluginMapper, qec QueryExecutorCreator, deserializer msp.IdentityDeserializer, capabilities Capabilities) *PluginValidator

func (*PluginValidator) ValidateWithPlugin

func (pv *PluginValidator) ValidateWithPlugin(ctx *Context) error

type PolicyEvaluator

type PolicyEvaluator struct {
	msp.IdentityDeserializer
}

func (*PolicyEvaluator) DeserializeIdentity

func (id *PolicyEvaluator) DeserializeIdentity(serializedIdentity []byte) (Identity, error)

func (*PolicyEvaluator) Evaluate

func (id *PolicyEvaluator) Evaluate(policyBytes []byte, signatureSet []*common.SignedData) error

type QueryExecutor

type QueryExecutor interface {
	ledger.QueryExecutor
}

type QueryExecutorCreator

type QueryExecutorCreator interface {
	NewQueryExecutor() (ledger.QueryExecutor, error)
}

type ResultsIteratorImpl

type ResultsIteratorImpl struct {
	ledger2.ResultsIterator
}

func (*ResultsIteratorImpl) Next

func (it *ResultsIteratorImpl) Next() (QueryResult, error)

type SerializedPolicy

type SerializedPolicy []byte

func (SerializedPolicy) Bytes

func (sp SerializedPolicy) Bytes() []byte

type StateFetcherImpl

type StateFetcherImpl struct {
	QueryExecutorCreator
}

func (*StateFetcherImpl) FetchState

func (sf *StateFetcherImpl) FetchState() (State, error)

type StateImpl

type StateImpl struct {
	ledger.QueryExecutor
}

func (*StateImpl) GetStateRangeScanIterator

func (s *StateImpl) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (ResultsIterator, error)

type Support

type Support interface {
	Acquire(ctx context.Context) error

	Release()

	Ledger() ledger.PeerLedger

	MSPManager() msp.MSPManager

	Apply(configtx *common.ConfigEnvelope) error

	GetMSPIDs(cid string) []string

	Capabilities() channelconfig.ApplicationCapabilities
}

type TxValidator

type TxValidator struct {
	ChainID string
	Support Support
	Vscc    vsccValidator
}

func NewTxValidator

func NewTxValidator(chainID string, support Support, sccp sysccprovider.SystemChaincodeProvider, pm PluginMapper) *TxValidator

func (*TxValidator) Validate

func (v *TxValidator) Validate(block *common.Block) error

type ValidationRouter

type ValidationRouter struct {
	CapabilityProvider
	V20Validator Validator
	V14Validator Validator
}

func (*ValidationRouter) Validate

func (v *ValidationRouter) Validate(block *common.Block) error

type Validator

type Validator interface {
	Validate(block *common.Block) error
}

type VsccValidatorImpl

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

func (*VsccValidatorImpl) GetInfoForValidate

func (*VsccValidatorImpl) VSCCValidateTx

func (v *VsccValidatorImpl) VSCCValidateTx(seq int, payload *common.Payload, envBytes []byte, block *common.Block) (error, peer.TxValidationCode)

func (*VsccValidatorImpl) VSCCValidateTxForCC

func (v *VsccValidatorImpl) VSCCValidateTxForCC(ctx *Context) error

Jump to

Keyboard shortcuts

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