chaindump

package
v0.0.0-...-f94ef0f Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(bc DumperRestorer, w *io.BinWriter, start, count uint32) error

Dump writes count blocks from start to the provided writer. Note: header needs to be written separately by client.

func Restore

func Restore(bc DumperRestorer, r *io.BinReader, skip, count uint32, f func(b *block.Block) error) error

Restore restores blocks from provided reader. f is called after addition of every block.

Types

type DumperRestorer

type DumperRestorer interface {
	AddBlock(block *block.Block) error
	GetBlock(hash common.Hash, full bool) (*block.Block, *types.Receipt, error)
	GetConfig() config.ProtocolConfiguration
	GetHeaderHash(int) common.Hash
}

DumperRestorer in the interface to get/add blocks from/to.

Jump to

Keyboard shortcuts

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