helpers

package
v5.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestDBConfig, _ = postgres.TestConfig.WithEnv()

Functions

func IndexChain

func IndexChain(indexer interfaces.StateDiffIndexer, params IndexChainParams) error

func SetupDB

func SetupDB() *sqlx.DB

SetupDB is use to setup a db for watcher tests

func TearDownDB

func TearDownDB(db *sqlx.DB) error

TearDownDB is used to tear down the watcher dbs after tests

func TestStateDiffIndexer

func TestStateDiffIndexer(ctx context.Context, chainConfig *params.ChainConfig, genHash common.Hash) (interfaces.StateDiffIndexer, error)

Types

type IndexChainParams

type IndexChainParams struct {
	Blocks     []*types.Block
	Receipts   []types.Receipts
	StateCache state.Database

	StateDiffParams statediff.Params
	TotalDifficulty *big.Int
	// Whether to skip indexing state nodes (state_cids, storage_cids)
	SkipStateNodes bool
	// Whether to skip indexing IPLD blocks
	SkipIPLDs bool
}

Jump to

Keyboard shortcuts

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