api

package
v6.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: BSD-3-Clause Imports: 8 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAPIEnv = errors.New("ErrAPIEnv")

ErrAPIEnv api的执行环境出问题,区块执行的时候,遇到这一个的错误需要retry

Functions

func IsGrpcError

func IsGrpcError(err error) bool

IsGrpcError 判断系统api 错误,还是 rpc 本身的错误

func IsQueueError

func IsQueueError(err error) bool

IsQueueError 是否是队列错误

Types

type ExecutorAPI

type ExecutorAPI interface {
	GetBlockByHashes(param *types.ReqHashes) (*types.BlockDetails, error)
	GetRandNum(param *types.ReqRandHash) ([]byte, error)
	QueryTx(param *types.ReqHash) (*types.TransactionDetail, error)
	IsErr() bool
}

ExecutorAPI 提供给执行器使用的接口 因为合约是主链和平行链通用的,所以,主链和平行链都可以调用这套接口

func New

New 新建接口

Jump to

Keyboard shortcuts

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