chaindump

package
v0.98.5 Latest Latest
Warning

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

Go to latest
Published: May 13, 2022 License: MIT Imports: 5 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 added in v0.98.1

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

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