gasm

package module
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README

#Bug Fix 对原有开源项目在vm_func.go NativeFunctionBlock增加: HasElse bool 以解决在判定条件分支时,可能跳转到错误的指令的问题

Documentation

Index

Constants

View Source
const (
	LruCacheSize = 64
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InstancesManager

type InstancesManager struct {
}

func (*InstancesManager) AfterSchedule

func (*InstancesManager) AfterSchedule(blockFingerprint string, blockHeight uint64)

func (*InstancesManager) BeforeSchedule

func (*InstancesManager) BeforeSchedule(blockFingerprint string, blockHeight uint64)

func (*InstancesManager) NewRuntimeInstance

func (*InstancesManager) NewRuntimeInstance(txSimContext protocol.TxSimContext, chainId, method, codePath string,
	contract *commonPb.Contract, byteCode []byte, log protocol.Logger) (protocol.RuntimeInstance, error)

func (*InstancesManager) StartVM

func (*InstancesManager) StartVM() error

func (*InstancesManager) StopVM

func (*InstancesManager) StopVM() error

type RuntimeInstance

type RuntimeInstance struct {
	ChainId string
	Log     protocol.Logger
}

RuntimeInstance gasm runtime

func (*RuntimeInstance) Invoke

func (r *RuntimeInstance) Invoke(contractId *commonPb.Contract, method string, byteCode []byte,
	parameters map[string][]byte, txContext protocol.TxSimContext, gasUsed uint64) (
	contractResult *commonPb.ContractResult, specialTxType protocol.ExecOrderTxType)

Invoke contract by call vm, implement protocol.RuntimeInstance

Directories

Path Synopsis
gasm-go

Jump to

Keyboard shortcuts

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