blockio

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockWriter

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

BlockReader can read blocks from db and snapshots

func NewBlockWriter

func NewBlockWriter(historyV3 bool) *BlockWriter

func (*BlockWriter) FillHeaderNumberIndex

func (w *BlockWriter) FillHeaderNumberIndex(logPrefix string, tx kv.RwTx, tmpDir string, from, to uint64, ctx context.Context, logger log.Logger) error

func (*BlockWriter) MakeBodiesCanonical

func (w *BlockWriter) MakeBodiesCanonical(tx kv.RwTx, from uint64) error

func (*BlockWriter) MakeBodiesNonCanonical

func (w *BlockWriter) MakeBodiesNonCanonical(tx kv.RwTx, from uint64) error

func (*BlockWriter) PruneBlocks

func (w *BlockWriter) PruneBlocks(ctx context.Context, tx kv.RwTx, blockTo uint64, blocksDeleteLimit int) error

PruneBlocks - [1, to) old blocks after moving it to snapshots. keeps genesis in db doesn't change sequences of kv.EthTx and kv.NonCanonicalTxs doesn't delete Receipts, Senders, Canonical markers, TotalDifficulty

func (*BlockWriter) PruneBorBlocks

func (w *BlockWriter) PruneBorBlocks(ctx context.Context, tx kv.RwTx, blockTo uint64, blocksDeleteLimit int) error

PruneBorBlocks - [1, to) old blocks after moving it to snapshots. keeps genesis in db doesn't change sequences of kv.EthTx and kv.NonCanonicalTxs doesn't delete Receipts, Senders, Canonical markers, TotalDifficulty

func (*BlockWriter) TruncateBodies

func (w *BlockWriter) TruncateBodies(db kv.RoDB, tx kv.RwTx, from uint64) error

Jump to

Keyboard shortcuts

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