arwenmandos

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2021 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const ElrondProtectedKeyPrefix = "ELROND"

ElrondProtectedKeyPrefix prefixes all Elrond reserved storage. Only the protocol can write to keys starting with this.

View Source
const ElrondRewardKey = ElrondProtectedKeyPrefix + "reward"

ElrondRewardKey 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 ArwenTestExecutor

type ArwenTestExecutor struct {
	World *worldhook.MockWorld
	// contains filtered or unexported fields
}

ArwenTestExecutor parses, interprets and executes both .test.json tests and .scen.json scenarios with Arwen.

func NewArwenTestExecutor

func NewArwenTestExecutor() (*ArwenTestExecutor, error)

NewArwenTestExecutor prepares a new ArwenTestExecutor instance.

func (*ArwenTestExecutor) DumpWorld added in v1.2.5

func (ae *ArwenTestExecutor) DumpWorld() error

DumpWorld prints the state of the MockWorld to stdout.

func (*ArwenTestExecutor) ExecuteCheckStateStep added in v1.2.5

func (ae *ArwenTestExecutor) ExecuteCheckStateStep(step *mj.CheckStateStep) error

ExecuteCheckStateStep executes a CheckStateStep defined by the current scenario.

func (*ArwenTestExecutor) ExecuteExternalStep added in v1.2.5

func (ae *ArwenTestExecutor) ExecuteExternalStep(step *mj.ExternalStepsStep) error

ExecuteExternalStep executes an external step referenced by the scenario.

func (*ArwenTestExecutor) ExecuteScenario

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

ExecuteScenario executes an individual test.

func (*ArwenTestExecutor) ExecuteSetStateStep added in v1.2.5

func (ae *ArwenTestExecutor) ExecuteSetStateStep(step *mj.SetStateStep) error

ExecuteSetStateStep executes a SetStateStep.

func (*ArwenTestExecutor) ExecuteStep

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

ExecuteStep executes an individual step from a scenario.

func (*ArwenTestExecutor) ExecuteTest

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

ExecuteTest executes an individual test.

func (*ArwenTestExecutor) ExecuteTxStep

func (ae *ArwenTestExecutor) ExecuteTxStep(step *mj.TxStep) (*vmi.VMOutput, error)

ExecuteTxStep executes a TxStep.

func (*ArwenTestExecutor) GetVM

GetVM yields a reference to the VMExecutionHandler used.

func (*ArwenTestExecutor) Reset

func (ae *ArwenTestExecutor) Reset()

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

func (*ArwenTestExecutor) SetMandosGasSchedule added in v1.2.5

func (ae *ArwenTestExecutor) SetMandosGasSchedule(newGasSchedule mj.GasSchedule) error

SetMandosGasSchedule updates the gas costs based on the mandos scenario config only changes the gas schedule once, this prevents subsequent gasSchedule declarations in externalSteps to overwrite

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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