blockio

package
v1.9.7-0...-44732ef Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: LGPL-3.0 Imports: 14 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 {
}

BlockWriter can write blocks from db and snapshots

func NewBlockWriter

func NewBlockWriter() *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) (deleted int, err error)

PruneBlocks - [1, to) old blocks after moving it to snapshots. keeps genesis in db doesn't change sequences of kv.EthTx 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