eth_state

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransformer

func NewTransformer() interfaces.Transformer

NewTransformer satisfies interfaces.TransformerConstructor for eth.state_cids

Types

type CSVWriter added in v1.1.0

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

CSVWriter struct for writing v3 DB eth.state_cids models to a csv file

func NewWriter added in v1.1.0

func NewWriter(dst io.WriteCloser) *CSVWriter

NewWriter satisfies interfaces.WriterConstructor for eth.state_cids

func (*CSVWriter) Close added in v1.1.0

func (cw *CSVWriter) Close() error

Close satisfies io.Closer

func (*CSVWriter) Write added in v1.1.0

func (cw *CSVWriter) Write(pgStr csv.WriteCSVStr, models interface{}) error

Write satisfies cshModel.Writer for v3 database for eth.state_cids

type StateModelV2

type StateModelV2 struct {
	ID       int64  `db:"id"`
	HeaderID int64  `db:"header_id"`
	Path     []byte `db:"state_path"`
	StateKey string `db:"state_leaf_key"`
	NodeType int    `db:"node_type"`
	CID      string `db:"cid"`
	MhKey    string `db:"mh_key"`
	Diff     bool   `db:"diff"`
}

StateModelV2 is the db model for eth.state_cids for v2 DB

type StateModelV2WithMeta

type StateModelV2WithMeta struct {
	BlockHash   string `db:"block_hash"`
	BlockNumber string `db:"block_number"`
	StateModelV2
}

StateModelV2WithMeta is the db model for eth.state_cids for v2 DB with the additional metadata required to convert to the v3 model

type StateModelV3

type StateModelV3 struct {
	HeaderID string `db:"header_id"`
	StateKey string `db:"state_leaf_key"`
	CID      string `db:"cid"`
	Path     []byte `db:"state_path"`
	NodeType int    `db:"node_type"`
	Diff     bool   `db:"diff"`
	MhKey    string `db:"mh_key"`
}

StateModelV3 is the db model for eth.state_cids for v3 DB

type Transformer

type Transformer struct {
}

Transformer struct for transforming v2 DB eth.state_cids models to v3 DB models

func (*Transformer) Transform

func (t *Transformer) Transform(models interface{}, expectedRange [2]uint64) (interface{}, [][2]uint64, error)

Transform satisfies interfaces.Transformer for eth.state_cids

Jump to

Keyboard shortcuts

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