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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelPolicyManagerGetter

type ChannelPolicyManagerGetter interface {
	policies.ChannelPolicyManagerGetter
}

type ChannelResources

type ChannelResources interface {
	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 Dispatcher

type Dispatcher interface {
	Dispatch(seq int, payload *common.Payload, envBytes []byte, block *common.Block) (error, peer.TxValidationCode)
}

type LedgerResources

type LedgerResources interface {
	GetTransactionByID(txID string) (*peer.ProcessedTransaction, error)

	NewQueryExecutor() (ledger.QueryExecutor, error)
}

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 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 PolicyManager

type PolicyManager interface {
	policies.Manager
}

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 Semaphore

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

	Release()
}

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 TxValidator

type TxValidator struct {
	ChannelID        string
	Semaphore        Semaphore
	ChannelResources ChannelResources
	LedgerResources  LedgerResources
	Dispatcher       Dispatcher
}

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