chaindump

package
v0.102.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 5 Imported by: 1

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 a client.

func Restore

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

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

Types

type DumperRestorer added in v0.98.1

type DumperRestorer interface {
	AddBlock(block *block.Block) error
	GetBlock(hash util.Uint256) (*block.Block, error)
	GetConfig() config.Blockchain
	GetHeaderHash(uint32) util.Uint256
}

DumperRestorer is an 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