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: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSysCC

func IsSysCC(name string) bool

func IsSysCCAndNotInvokableCC2CC

func IsSysCCAndNotInvokableCC2CC(name string) bool

func IsSysCCAndNotInvokableExternal

func IsSysCCAndNotInvokableExternal(name string) bool

Types

type Capabilities

type Capabilities interface {
	vc.Capabilities
}

type ChannelResources

type ChannelResources interface {
	Ledger() ledger.PeerLedger

	MSPManager() msp.MSPManager

	Apply(configtx *common.ConfigEnvelope) error

	GetMSPIDs() []string

	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 IdentityDeserializer

type IdentityDeserializer interface {
	msp.IdentityDeserializer
}

type Mapper

type Mapper interface {
	vp.Mapper
}

type Plugin

type Plugin interface {
	validation.Plugin
}

type PluginFactory

type PluginFactory interface {
	validation.PluginFactory
}

type PluginValidator

type PluginValidator struct {
	sync.Mutex

	vp.Mapper
	QueryExecutorCreator
	msp.IdentityDeserializer
	// contains filtered or unexported fields
}

func NewPluginValidator

func NewPluginValidator(pm vp.Mapper, qec QueryExecutorCreator, deserializer msp.IdentityDeserializer, capabilities vc.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) (vi.Identity, error)

func (*PolicyEvaluator) Evaluate

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

type QueryExecutorCreator

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

type ResultsIteratorImpl

type ResultsIteratorImpl struct {
	ledger2.ResultsIterator
}

func (*ResultsIteratorImpl) Next

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

type Semaphore

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

	Release()
}

type StateFetcherImpl

type StateFetcherImpl struct {
	QueryExecutorCreator
}

func (*StateFetcherImpl) FetchState

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

type StateImpl

type StateImpl struct {
	ledger.QueryExecutor
}

func (*StateImpl) GetStateRangeScanIterator

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

type TxValidator

type TxValidator struct {
	ChannelID        string
	Semaphore        Semaphore
	ChannelResources ChannelResources
	Vscc             vsccValidator
}

func NewTxValidator

func NewTxValidator(channelID string, sem Semaphore, cr ChannelResources, pm plugin.Mapper) *TxValidator

func (*TxValidator) Validate

func (v *TxValidator) 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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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