proof

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidIBTP          = "invalid ibtp"
	AppchainNotAvailable = "appchain not available"
	NoBindRule           = "appchain didn't register rule"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Verify

type Verify interface {
	// CheckProof verifies ibtp proof in interchain transaction
	CheckProof(tx pb.Transaction) (bool, error)

	// ValidationEngine returns validation engine
	ValidationEngine() validator.Engine

	// GetProof gets proof by transaction hash
	GetProof(txHash types.Hash) ([]byte, bool)

	// DeleteProof deletes proof in verify pool
	DeleteProof(txHash types.Hash)
}

func New

func New(ledger *ledger.Ledger, logger logrus.FieldLogger) Verify

type VerifyPool

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

func (*VerifyPool) CheckProof

func (pl *VerifyPool) CheckProof(tx pb.Transaction) (bool, error)

func (*VerifyPool) DeleteProof

func (pl *VerifyPool) DeleteProof(txHash types.Hash)

func (*VerifyPool) GetProof

func (pl *VerifyPool) GetProof(txHash types.Hash) ([]byte, bool)

func (*VerifyPool) ValidationEngine

func (pl *VerifyPool) ValidationEngine() validator.Engine

Jump to

Keyboard shortcuts

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