Documentation ¶
Index ¶
- Constants
- Variables
- func BindTxQueryJVMEnvHandle(jvmGoHandle, envHandle *C.char) C.int
- func ExecActive(from *C.char, amount C.long, envHandle *C.char) C.int
- func ExecFrozen(from *C.char, amount C.long, envHandle *C.char) C.int
- func ExecTransfer(from, to *C.char, amount C.long, envHandle *C.char) C.int
- func ForwardQueryResult(exceptionOccurred bool, info []string, jvmgo *C.char) bool
- func GetCurrentHeight(envHandle *C.char) C.long
- func GetFrom(envHandle *C.char) *C.char
- func GetFromLocal(key *C.char, keySize C.int, valueSize *C.int, envHandle *C.char) *C.char
- func GetFromLocalInStr(key *C.char, size *C.int, envHandle *C.char) *C.char
- func GetFromState(key *C.char, keySize C.int, valueSize *C.int, envHandle *C.char) *C.char
- func GetFromStateInStr(key *C.char, size *C.int, envHandle *C.char) *C.char
- func GetName() string
- func GetRandom(envHandle *C.char) *C.char
- func Init(name string, cfg *types.Chain33Config, sub []byte)
- func SetLocal(key *C.char, keySize C.int, value *C.char, valueSize C.int, envHandle *C.char) C.int
- func SetLocalInStr(key *C.char, value *C.char, envHandle *C.char) C.int
- func SetQueryResult(jvmgo *C.char, exceptionOccurred C.int, info **C.char, count, sizePtr C.int) C.int
- func SetState(key *C.char, keySize C.int, value *C.char, valueSize C.int, envHandle *C.char) C.int
- func SetStateInStr(key *C.char, value *C.char, envHandle *C.char) C.int
- func StopTransWithErrInfo(errInfo *C.char, envHandle *C.char) C.int
- type JVMExecutor
- func (jvm *JVMExecutor) Allow(tx *types.Transaction, index int) error
- func (jvm *JVMExecutor) ExecDelLocal_CallJvmContract(payload *jvmTypes.CallJvmContract, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (jvm *JVMExecutor) ExecDelLocal_CreateJvmContract(payload *jvmTypes.CreateJvmContract, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (jvm *JVMExecutor) ExecDelLocal_UpdateJvmContract(payload *jvmTypes.UpdateJvmContract, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (jvm *JVMExecutor) ExecLocal_CallJvmContract(payload *jvmTypes.CallJvmContract, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (jvm *JVMExecutor) ExecLocal_CreateJvmContract(payload *jvmTypes.CreateJvmContract, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (jvm *JVMExecutor) ExecLocal_UpdateJvmContract(payload *jvmTypes.UpdateJvmContract, tx *types.Transaction, ...) (*types.LocalDBSet, error)
- func (jvm *JVMExecutor) Exec_CallJvmContract(callJvmContract *jvmTypes.CallJvmContract, tx *types.Transaction, index int) (*types.Receipt, error)
- func (jvm *JVMExecutor) Exec_CreateJvmContract(createJvmContract *jvmTypes.CreateJvmContract, tx *types.Transaction, ...) (*types.Receipt, error)
- func (jvm *JVMExecutor) Exec_UpdateJvmContract(updateJvmContract *jvmTypes.UpdateJvmContract, tx *types.Transaction, ...) (*types.Receipt, error)
- func (jvm *JVMExecutor) ExecutorOrder() int64
- func (jvm *JVMExecutor) GenerateExecReceipt(execName, caller, contractAddr string, opType jvmTypes.JvmContratOpType) (*types.Receipt, error)
- func (jvm *JVMExecutor) GetContractAddr() string
- func (jvm *JVMExecutor) GetDriverName() string
- func (jvm *JVMExecutor) Query_CheckContractNameExist(in *jvmTypes.CheckJVMContractNameReq) (types.Message, error)
- func (jvm *JVMExecutor) Query_JavaContract(in *jvmTypes.JVMQueryReq) (types.Message, error)
- type QueryResult
Constants ¶
Variables ¶
View Source
var (
Chain33LoaderJarPath = "." //路径信息不需要包含字符‘/’,C语言中拼接时,会添加
)
Functions ¶
func ForwardQueryResult ¶
forward the query result to the corresponding jvm
func GetFromLocal ¶
func GetFromLocalInStr ¶
调用者负责释放返回指针内存
func GetFromState ¶
需要调用者释放内存
func GetFromStateInStr ¶
调用者负责释放返回指针内存
func SetQueryResult ¶
Types ¶
type JVMExecutor ¶
type JVMExecutor struct { drivers.DriverBase // contains filtered or unexported fields }
JVMExecutor 执行器结构
func (*JVMExecutor) Allow ¶
func (jvm *JVMExecutor) Allow(tx *types.Transaction, index int) error
Allow 允许哪些交易在本命执行器执行
func (*JVMExecutor) ExecDelLocal_CallJvmContract ¶
func (jvm *JVMExecutor) ExecDelLocal_CallJvmContract(payload *jvmTypes.CallJvmContract, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_CallJvmContract 本地撤销执行调用Jvm合约
func (*JVMExecutor) ExecDelLocal_CreateJvmContract ¶
func (jvm *JVMExecutor) ExecDelLocal_CreateJvmContract(payload *jvmTypes.CreateJvmContract, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_CreateJvmContract 本地撤销执行创建Jvm合约
func (*JVMExecutor) ExecDelLocal_UpdateJvmContract ¶
func (jvm *JVMExecutor) ExecDelLocal_UpdateJvmContract(payload *jvmTypes.UpdateJvmContract, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecDelLocal_UpdateJvmContract 本地撤销执行更新Jvm合约
func (*JVMExecutor) ExecLocal_CallJvmContract ¶
func (jvm *JVMExecutor) ExecLocal_CallJvmContract(payload *jvmTypes.CallJvmContract, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_CallJvmContract 本地执行调用Jvm合约
func (*JVMExecutor) ExecLocal_CreateJvmContract ¶
func (jvm *JVMExecutor) ExecLocal_CreateJvmContract(payload *jvmTypes.CreateJvmContract, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_CreateJvmContract 本地执行创建Jvm合约
func (*JVMExecutor) ExecLocal_UpdateJvmContract ¶
func (jvm *JVMExecutor) ExecLocal_UpdateJvmContract(payload *jvmTypes.UpdateJvmContract, tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error)
ExecLocal_UpdateJvmContract 本地执行更新Jvm合约
func (*JVMExecutor) Exec_CallJvmContract ¶
func (jvm *JVMExecutor) Exec_CallJvmContract(callJvmContract *jvmTypes.CallJvmContract, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_CallJvmContract 调用合约
func (*JVMExecutor) Exec_CreateJvmContract ¶
func (jvm *JVMExecutor) Exec_CreateJvmContract(createJvmContract *jvmTypes.CreateJvmContract, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_CreateJvmContract 创建合约
func (*JVMExecutor) Exec_UpdateJvmContract ¶
func (jvm *JVMExecutor) Exec_UpdateJvmContract(updateJvmContract *jvmTypes.UpdateJvmContract, tx *types.Transaction, index int) (*types.Receipt, error)
Exec_UpdateJvmContract 创建合约
func (*JVMExecutor) ExecutorOrder ¶
func (jvm *JVMExecutor) ExecutorOrder() int64
ExecutorOrder 设置localdb的EnableRead
func (*JVMExecutor) GenerateExecReceipt ¶
func (jvm *JVMExecutor) GenerateExecReceipt(execName, caller, contractAddr string, opType jvmTypes.JvmContratOpType) (*types.Receipt, error)
GenerateExecReceipt generate exec receipt
func (*JVMExecutor) GetContractAddr ¶
func (jvm *JVMExecutor) GetContractAddr() string
func (*JVMExecutor) GetDriverName ¶
func (jvm *JVMExecutor) GetDriverName() string
GetDriverName 获取driver 名称
func (*JVMExecutor) Query_CheckContractNameExist ¶
func (jvm *JVMExecutor) Query_CheckContractNameExist(in *jvmTypes.CheckJVMContractNameReq) (types.Message, error)
Query_CheckContractNameExist 确认是否存在该Jvm合约,
func (*JVMExecutor) Query_JavaContract ¶
func (jvm *JVMExecutor) Query_JavaContract(in *jvmTypes.JVMQueryReq) (types.Message, error)
查询java合约状态
type QueryResult ¶
type QueryResult struct {
// contains filtered or unexported fields
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.