coremandos

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const DharitriProtectedKeyPrefix = "DHARITRI"

DharitriProtectedKeyPrefix prefixes all Dharitri reserved storage. Only the protocol can write to keys starting with this.

View Source
const DharitriRewardKey = DharitriProtectedKeyPrefix + "reward"

DharitriRewardKey is the storage key where the protocol writes when sending out rewards.

Variables

View Source
var TestVMType = []byte{0, 0}

TestVMType is the VM type argument we use in tests.

Functions

This section is empty.

Types

type CoreTestExecutor

type CoreTestExecutor struct {
	World *worldhook.BlockchainHookMock
	// contains filtered or unexported fields
}

CoreTestExecutor parses, interprets and executes both .test.json tests and .scen.json scenarios with Core.

func NewCoreTestExecutor

func NewCoreTestExecutor() (*CoreTestExecutor, error)

NewCoreTestExecutor prepares a new CoreTestExecutor instance.

func (*CoreTestExecutor) ExecuteScenario

func (ae *CoreTestExecutor) ExecuteScenario(scenario *mj.Scenario, fileResolver fr.FileResolver) error

ExecuteScenario executes an individual test.

func (*CoreTestExecutor) ExecuteStep

func (ae *CoreTestExecutor) ExecuteStep(generalStep mj.Step) error

ExecuteStep executes a single scenario step and updates mock state.

func (*CoreTestExecutor) ExecuteTest

func (ae *CoreTestExecutor) ExecuteTest(test *mj.Test) error

ExecuteTest executes an individual test.

func (*CoreTestExecutor) ExecuteTxStep

func (ae *CoreTestExecutor) ExecuteTxStep(txStep *mj.TxStep) (*vmi.VMOutput, error)

ExecuteTxStep executes a tx step and updates mock state.

func (*CoreTestExecutor) GetVM

GetVM yields a reference to the VMExecutionHandler used.

func (*CoreTestExecutor) Reset

func (ae *CoreTestExecutor) Reset()

Reset clears state/world. Is called in RunAllJSONScenariosInDirectory, but not in RunSingleJSONScenario.

Jump to

Keyboard shortcuts

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