tests

package
v0.15.4 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2025 License: GPL-3.0, LGPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Forks table defines supported forks and their chain config.

Functions

func AvailableForks added in v0.5.0

func AvailableForks() []string

AvailableForks returns the set of defined fork names

func FromHex added in v0.5.0

func FromHex(s string) ([]byte, error)

FromHex returns the bytes represented by the hexadecimal string s. s may be prefixed with "0x". This is copy-pasted from bytes.go, which does not return the error

func GetRepoRootPath added in v0.15.3

func GetRepoRootPath(suffix string) string

Types

type RLPTest added in v0.5.0

type RLPTest struct {
	// If the value of In is "INVALID" or "VALID", the test
	// checks whether Out can be decoded into a value of
	// type interface{}.
	//
	// For other JSON values, In is treated as a driver for
	// calls to rlp.Stream. The test also verifies that encoding
	// In produces the bytes in Out.
	In interface{}

	// Out is a hex-encoded RLP value.
	Out string
}

RLPTest is the JSON structure of a single RLP test.

func (*RLPTest) Run added in v0.5.0

func (t *RLPTest) Run() error

Run executes the test.

type StateTestState added in v0.13.8

type StateTestState struct {
	StateDB   *state.StateDB
	TrieDB    *triedb.Database
	Snapshots *snapshot.Tree
	TempDir   string
}

StateTestState groups all the state database objects together for use in tests.

func MakePreState added in v0.5.0

func MakePreState(db ethdb.Database, accounts types.GenesisAlloc, snapshotter bool, scheme string) StateTestState

MakePreState creates a state containing the given allocation.

func (*StateTestState) Close added in v0.13.8

func (st *StateTestState) Close()

Close should be called when the state is no longer needed, ie. after running the test.

type UnsupportedForkError added in v0.5.0

type UnsupportedForkError struct {
	Name string
}

UnsupportedForkError is returned when a test requests a fork that isn't implemented.

func (UnsupportedForkError) Error added in v0.5.0

func (e UnsupportedForkError) Error() string

Directories

Path Synopsis
aggregator
Package aggregator is a generated GoMock package.
Package aggregator is a generated GoMock package.

Jump to

Keyboard shortcuts

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