qscc

package
v0.0.0-...-523a819 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetChainInfo       string = "GetChainInfo"
	GetBlockByNumber   string = "GetBlockByNumber"
	GetBlockByHash     string = "GetBlockByHash"
	GetTransactionByID string = "GetTransactionByID"
	GetBlockByTxID     string = "GetBlockByTxID"
)

这些是来自invoke first参数的函数名

Variables

This section is empty.

Functions

This section is empty.

Types

type LedgerQuerier

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

LedgerQueryer实现了分类账查询功能,包括: GETCHANIN信息返回BuffChanIn信息 -getblockbynumber返回一个块 GETBaseByHASH返回块 -getTransactionByID返回事务

func New

func New(aclProvider aclmgmt.ACLProvider) *LedgerQuerier

new返回qsc的实例。 通常每个对等机调用一次。

func (*LedgerQuerier) Chaincode

func (e *LedgerQuerier) Chaincode() shim.Chaincode

func (*LedgerQuerier) Enabled

func (e *LedgerQuerier) Enabled() bool

func (*LedgerQuerier) Init

创建链时,每个链调用一次init。 这允许chaincode在 链上的任何事务执行。

func (*LedgerQuerier) InitArgs

func (e *LedgerQuerier) InitArgs() [][]byte

func (*LedgerQuerier) InvokableCC2CC

func (e *LedgerQuerier) InvokableCC2CC() bool

func (*LedgerQuerier) InvokableExternal

func (e *LedgerQuerier) InvokableExternal() bool

func (*LedgerQuerier) Invoke

调用invoke时使用args[0]包含查询函数名args[1] 包含链ID,暂时是临时的,直到它是存根的一部分。 每个函数都需要如下所述的其他参数: getchaininfo:返回以字节为单位封送的blockchaininfo对象 getBlockByNumber:返回由args[2]中的块号指定的块。 # GetBlockByHash: Return the block specified by block hash in args[2] getTransactionByID:返回参数[2]中ID指定的事务

func (*LedgerQuerier) Name

func (e *LedgerQuerier) Name() string

func (*LedgerQuerier) Path

func (e *LedgerQuerier) Path() string

Jump to

Keyboard shortcuts

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