state

package
v0.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2025 License: GPL-3.0, LGPL-3.0 Imports: 5 Imported by: 11

Documentation

Overview

Package state provides a caching layer atop the Ethereum state trie.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(db ethdb.Database) ethstate.Database

func NewDatabaseWithConfig

func NewDatabaseWithConfig(db ethdb.Database, config *triedb.Config) ethstate.Database

func NewDatabaseWithNodeDB

func NewDatabaseWithNodeDB(db ethdb.Database, triedb *triedb.Database) ethstate.Database

Types

type Database

type Database = ethstate.Database

type Dump

type Dump = ethstate.Dump

type DumpAccount

type DumpAccount = ethstate.DumpAccount

type DumpCollector

type DumpCollector = ethstate.DumpCollector

type DumpConfig

type DumpConfig = ethstate.DumpConfig

type StateDB

type StateDB struct {
	*ethstate.StateDB
	// contains filtered or unexported fields
}

StateDB wraps go-ethereum's StateDB with minimal extensions

func New

func New(root common.Hash, db Database, snaps *snapshot.Tree) (*StateDB, error)

New creates a new state from a given trie.

func (*StateDB) GetTxHash

func (s *StateDB) GetTxHash() common.Hash

GetTxHash returns the current transaction hash

func (*StateDB) SetTxContext

func (s *StateDB) SetTxContext(thash common.Hash, ti int)

SetTxContext sets the current transaction hash and index

type Trie

type Trie = ethstate.Trie

Directories

Path Synopsis
Package snapshot implements a journalled, dynamic state dump.
Package snapshot implements a journalled, dynamic state dump.

Jump to

Keyboard shortcuts

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