vm

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2018 License: LGPL-3.0 Imports: 18 Imported by: 4

Documentation

Overview

Package vm is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetUp

func SetUp(config *common.VMConfig) error

SetUp setup global engine settings

Types

type Engine

type Engine interface {
	SetUp(k, v string) error
	Exec(tx0 *tx.Tx, limit time.Duration) (*tx.TxReceipt, error)
	GC()
}

Engine the smart contract engine

func NewEngine

func NewEngine(bh *block.BlockHead, cb database.IMultiValue) Engine

NewEngine ...

type MockVM

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

MockVM is a mock of VM interface

func NewMockVM

func NewMockVM(ctrl *gomock.Controller) *MockVM

NewMockVM creates a new mock instance

func (*MockVM) Compile

func (m *MockVM) Compile(arg0 *contract.Contract) (string, error)

Compile mocks base method

func (*MockVM) EXPECT

func (m *MockVM) EXPECT() *MockVMMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockVM) Init

func (m *MockVM) Init() error

Init mocks base method

func (*MockVM) LoadAndCall

func (m *MockVM) LoadAndCall(arg0 *host.Host, arg1 *contract.Contract, arg2 string, arg3 ...interface{}) ([]interface{}, *contract.Cost, error)

LoadAndCall mocks base method

func (*MockVM) Release

func (m *MockVM) Release()

Release mocks base method

type MockVMMockRecorder

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

MockVMMockRecorder is the mock recorder for MockVM

func (*MockVMMockRecorder) Compile

func (mr *MockVMMockRecorder) Compile(arg0 interface{}) *gomock.Call

Compile indicates an expected call of Compile

func (*MockVMMockRecorder) Init

func (mr *MockVMMockRecorder) Init() *gomock.Call

Init indicates an expected call of Init

func (*MockVMMockRecorder) LoadAndCall

func (mr *MockVMMockRecorder) LoadAndCall(arg0, arg1, arg2 interface{}, arg3 ...interface{}) *gomock.Call

LoadAndCall indicates an expected call of LoadAndCall

func (*MockVMMockRecorder) Release

func (mr *MockVMMockRecorder) Release() *gomock.Call

Release indicates an expected call of Release

type Monitor

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

Monitor ...

func NewMonitor

func NewMonitor() *Monitor

NewMonitor ...

func (*Monitor) Call

func (m *Monitor) Call(h *host.Host, contractName, api string, jarg string) (rtn []interface{}, cost *contract.Cost, err error)

Call ... nolint

func (*Monitor) Compile

func (m *Monitor) Compile(con *contract.Contract) (string, error)

Compile ...

type VM

type VM interface {
	Init() error
	Compile(contract *contract.Contract) (string, error)
	LoadAndCall(host *host.Host, contract *contract.Contract, api string, args ...interface{}) (rtn []interface{}, cost *contract.Cost, err error)
	Release()
}

VM ...

func Factory

func Factory(lang string) VM

Factory ...

Directories

Path Synopsis
Package database is a generated GoMock package.
Package database is a generated GoMock package.

Jump to

Keyboard shortcuts

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