vm

package
v3.0.8+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: LGPL-3.0 Imports: 20 Imported by: 0

Documentation

Overview

Package vm is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckTxGasLimitValid

func CheckTxGasLimitValid(t *tx.Tx, currentGas *common.Fixed, dbVisitor *database.Visitor) (err error)

CheckTxGasLimitValid ...

func UnmarshalArgs

func UnmarshalArgs(abi *contract.ABI, data string) ([]interface{}, error)

UnmarshalArgs convert action data to args according to abi

Types

type Isolator added in v1.1.0

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

Isolator new entrance instead of Engine

func (*Isolator) ClearAll added in v1.1.0

func (i *Isolator) ClearAll()

ClearAll clear this isolator

func (*Isolator) ClearTx added in v1.1.0

func (i *Isolator) ClearTx()

ClearTx clear this tx

func (*Isolator) Commit added in v1.1.0

func (i *Isolator) Commit()

Commit flush changes to db

func (*Isolator) PayCost added in v1.1.0

func (i *Isolator) PayCost() (*tx.TxReceipt, error)

PayCost as name

func (*Isolator) Prepare added in v1.1.0

func (i *Isolator) Prepare(bh *block.BlockHead, db *database.Visitor, logger *ilog.Logger) error

Prepare Isolator

func (*Isolator) PrepareTx added in v1.1.0

func (i *Isolator) PrepareTx(t *tx.Tx, limit time.Duration) error

PrepareTx read tx and ready to run

func (*Isolator) Run added in v1.1.0

func (i *Isolator) Run() (*tx.TxReceipt, error)

Run actions in tx

func (*Isolator) TriggerBlockBaseMode added in v1.1.0

func (i *Isolator) TriggerBlockBaseMode()

TriggerBlockBaseMode start blockbase mode

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

func (*MockVM) Validate added in v1.1.0

func (m *MockVM) Validate(arg0 *contract.Contract) error

Validate 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

func (*MockVMMockRecorder) Validate added in v1.1.0

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

Validate indicates an expected call of Validate

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 ...

func (*Monitor) Validate added in v1.1.0

func (m *Monitor) Validate(con *contract.Contract) error

Validate ...

type VM

type VM interface {
	Init() error
	Validate(contract *contract.Contract) 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