state

package
v0.0.0-...-035baff Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeOffTheChainStateDB

func MakeOffTheChainStateDB(alloc substate.SubstateAlloc) *state.StateDB

MakeOffTheChainStateDB returns an in-memory *state.StateDB initialized with alloc

func NewOffTheChainStateDB

func NewOffTheChainStateDB() *state.StateDB

NewOffTheChainStateDB returns an empty in-memory *state.StateDB without disk caches

Types

type StateDB

type StateDB interface {
	// The State DB must act as a state DB for the VM
	vm.StateDB
	// Also, some extra functionality must be provided to the replay tool.
	Prepare(common.Hash, int)
	Finalise(bool)
	IntermediateRoot(deleteEmptyObjects bool) common.Hash
	Commit(bool) (common.Hash, error)
	GetLogs(common.Hash, common.Hash) []*types.Log
	GetSubstatePostAlloc() substate.SubstateAlloc
}

func MakeInMemoryStateDB

func MakeInMemoryStateDB(alloc *substate.SubstateAlloc, block uint64) StateDB

MakeInMemoryStateDB creates a StateDB instance reflecting the state captured by the provided Substate allocation.

Jump to

Keyboard shortcuts

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