Documentation ¶
Index ¶
Constants ¶
View Source
const ( FabricRuleAddr = "0x00000000000000000000000000000000000000a0" SimFabricRuleAddr = "0x00000000000000000000000000000000000000a1" HappyRuleAddr = "0x00000000000000000000000000000000000000a2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECDSASignature ¶
type Engine ¶
type Engine interface {
Validate(address, from string, proof, payload []byte, validators string) (bool, uint64, error)
}
Engine runs for validation
type FabSimValidator ¶
type FabSimValidator struct {
// contains filtered or unexported fields
}
Validator is the instance that can use wasm to verify transaction validity
func NewFabSimValidator ¶
func NewFabSimValidator(logger logrus.FieldLogger) *FabSimValidator
New a validator instance
type FabV14Validator ¶
type FabV14Validator struct {
// contains filtered or unexported fields
}
Validator is the instance that can use wasm to verify transaction validity
func NewFabV14Validator ¶
func NewFabV14Validator(logger logrus.FieldLogger) *FabV14Validator
New a validator instance
func (*FabV14Validator) EvaluateSignedData ¶
func (vlt *FabV14Validator) EvaluateSignedData(signedData []*protoutil.SignedData, identityDeserializer mspi.IdentityDeserializer, policy policies.Policy) (bool, uint64, error)
type HappyValidator ¶
type HappyValidator struct { }
type ValidationEngine ¶
Validator is the instance that can use wasm to verify transaction validity
func NewValidationEngine ¶
func NewValidationEngine(ledger Ledger, instances *sync.Map, logger logrus.FieldLogger, gasLimit uint64) *ValidationEngine
New a validator instance
type Validator ¶
type Validator interface {
Verify(from string, proof, payload []byte, validators string) (bool, uint64, error)
}
Validator chooses specific method to verify transaction
type ValidatorPool ¶
func NewValidationPool ¶
func NewValidationPool(size int) *ValidatorPool
func (*ValidatorPool) Add ¶
func (pool *ValidatorPool) Add(validator Validator)
func (*ValidatorPool) GetValidator ¶
func (pool *ValidatorPool) GetValidator() Validator
func (*ValidatorPool) SetValidator ¶
func (pool *ValidatorPool) SetValidator(vlt Validator)
type ValidatorPools ¶
func NewValidationPools ¶
func NewValidationPools() *ValidatorPools
func (*ValidatorPools) GetPool ¶
func (p *ValidatorPools) GetPool(address string) (*ValidatorPool, bool)
func (*ValidatorPools) SetPool ¶
func (p *ValidatorPools) SetPool(address string, pool *ValidatorPool)
type WasmValidator ¶
type WasmValidator struct {
// contains filtered or unexported fields
}
Validator is the instance that can use wasm to verify transaction validity
func NewWasmValidator ¶
func NewWasmValidator(code []byte, logger logrus.FieldLogger, gasLimit uint64) *WasmValidator
New a validator instance
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_validator is a generated GoMock package.
|
Package mock_validator is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.