Documentation ¶
Index ¶
- Constants
- type BlockContract
- type BlockRuntime
- func (r *BlockRuntime) GetArchiveBlockHeight(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetArchiveStatus(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockByHash(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockByHeight(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockByTxId(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockHeaderByHeight(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockHeightByHash(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockHeightByTxId(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockWithTxRWSetsByHash(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetBlockWithTxRWSetsByHeight(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetChainInfo(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetFullBlockByHeight(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetLastBlock(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetLastConfigBlock(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetMerklePathByTxId(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetNodeChainList(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- func (r *BlockRuntime) GetTxByTxId(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
- type BlockRuntimeParam
Constants ¶
const (
// TRUE string const
TRUE = "true"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockContract ¶
type BlockContract struct {
// contains filtered or unexported fields
}
BlockContract 区块查询合约对象
func NewBlockContract ¶
func NewBlockContract(log protocol.Logger) *BlockContract
NewBlockContract BlockContract构造函数 @param log @return *BlockContract
func (*BlockContract) GetMethod ¶
func (c *BlockContract) GetMethod(methodName string) common.ContractFunc
GetMethod get register method by name
type BlockRuntime ¶
type BlockRuntime struct {
// contains filtered or unexported fields
}
BlockRuntime Block合约运行时
func (*BlockRuntime) GetArchiveBlockHeight ¶
func (r *BlockRuntime) GetArchiveBlockHeight(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)
GetArchiveBlockHeight 获得已经归档的区块高度 @param context @param params @return []byte @return error
func (*BlockRuntime) GetArchiveStatus ¶ added in v2.3.3
func (r *BlockRuntime) GetArchiveStatus(context protocol.TxSimContext, params map[string][]byte) ([]byte, error)
GetArchiveStatus 获得归档信息 @param context @param params @return []byte @return error
func (*BlockRuntime) GetBlockByHash ¶
func (r *BlockRuntime) GetBlockByHash(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( []byte, error)
GetBlockByHash 根据区块Hash获得区块 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetBlockByHeight ¶
func (r *BlockRuntime) GetBlockByHeight(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( []byte, error)
GetBlockByHeight 根据高度查询区块 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetBlockByTxId ¶
func (r *BlockRuntime) GetBlockByTxId(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( []byte, error)
GetBlockByTxId 根据TxID获得所在的区块 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetBlockHeaderByHeight ¶
func (r *BlockRuntime) GetBlockHeaderByHeight(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
GetBlockHeaderByHeight 根据区块高度获得区块头 @param txSimContext @param params @return []byte @return error
func (*BlockRuntime) GetBlockHeightByHash ¶
func (r *BlockRuntime) GetBlockHeightByHash(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
GetBlockHeightByHash 根据区块Hash获得该区块的高度 @param txSimContext @param params @return []byte @return error
func (*BlockRuntime) GetBlockHeightByTxId ¶
func (r *BlockRuntime) GetBlockHeightByTxId(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
GetBlockHeightByTxId 根据TxID获得所在的区块高度 @param txSimContext @param params @return []byte @return error
func (*BlockRuntime) GetBlockWithTxRWSetsByHash ¶
func (r *BlockRuntime) GetBlockWithTxRWSetsByHash(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( []byte, error)
GetBlockWithTxRWSetsByHash 根据区块Hash获得区块和读写集 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetBlockWithTxRWSetsByHeight ¶
func (r *BlockRuntime) GetBlockWithTxRWSetsByHeight(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( []byte, error)
GetBlockWithTxRWSetsByHeight 根据高度查询区块和读写集 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetChainInfo ¶
func (r *BlockRuntime) GetChainInfo(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
GetChainInfo 获得链信息 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetFullBlockByHeight ¶
func (r *BlockRuntime) GetFullBlockByHeight(txSimContext protocol.TxSimContext, params map[string][]byte) ([]byte, error)
GetFullBlockByHeight 获得完整的区块信息(包括了合约事件,而且不得裁剪) @param txSimContext @param params @return []byte @return error
func (*BlockRuntime) GetLastBlock ¶
func (r *BlockRuntime) GetLastBlock(txSimContext protocol.TxSimContext, parameters map[string][]byte) ([]byte, error)
GetLastBlock 获得最新的区块 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetLastConfigBlock ¶
func (r *BlockRuntime) GetLastConfigBlock(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( []byte, error)
GetLastConfigBlock 获得最新的配置区块 @param txSimContext @param parameters @return []byte @return error
func (*BlockRuntime) GetMerklePathByTxId ¶
func (r *BlockRuntime) GetMerklePathByTxId(txSimContext protocol.TxSimContext, parameters map[string][]byte) ( []byte, error)
GetMerklePathByTxId 获得一个交易的默克尔验证路径 @param txSimContext @param parameters TxID @return []byte @return error
type BlockRuntimeParam ¶
type BlockRuntimeParam struct {
// contains filtered or unexported fields
}
BlockRuntimeParam 查询参数