state_dry_runner

package
v0.0.0-...-7b0d77e Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DryRunner

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

func (*DryRunner) Apply

func (self *DryRunner) Apply(blk *vm.Block, trx *vm.Transaction) vm.ExecutionResult

func (*DryRunner) Init

func (self *DryRunner) Init(
	db state_db.DB,
	get_block_hash vm.GetHashFunc,
	dpos_api *dpos.API,
	get_reader func(blk_n types.BlockNum) contract_storage.StorageReader,
	chain_config *chain_config.ChainConfig,
) *DryRunner

func (*DryRunner) UpdateConfig

func (self *DryRunner) UpdateConfig(cfg *chain_config.ChainConfig)

type ExecutionResult

type ExecutionResult struct {
	Gas         uint64            `json:"gas"`
	Failed      bool              `json:"failed"`
	ReturnValue string            `json:"returnValue"`
	StructLogs  []vm.StructLogRes `json:"structLogs"`
}

ExecutionResult groups all structured logs emitted by the EVM while replaying a transaction in debug mode as well as transaction execution status, the amount of gas used and the return value

type TraceRunner

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

func (*TraceRunner) Init

func (self *TraceRunner) Init(
	db state_db.DB,
	get_block_hash vm.GetHashFunc,
	dpos_api *dpos.API,
	get_reader func(blk_n types.BlockNum) contract_storage.StorageReader,
	chain_config *chain_config.ChainConfig,
) *TraceRunner

func (*TraceRunner) Trace

func (self *TraceRunner) Trace(blk *vm.Block, trxs *[]vm.Transaction, conf *vm.TracingConfig) []byte

func (*TraceRunner) UpdateConfig

func (self *TraceRunner) UpdateConfig(cfg *chain_config.ChainConfig)

Jump to

Keyboard shortcuts

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