proof

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2022 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProofError           = "proof verify failed"
	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, uint64, 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, bxhID, wasmGasLimit uint64) Verify

type VerifyPool

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

func (*VerifyPool) CheckProof

func (pl *VerifyPool) CheckProof(tx pb.Transaction) (ok bool, gasUsed uint64, err 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