snapshotdb

package
v0.73.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SavePayloadsToFile

func SavePayloadsToFile(dbPath string, outputPath string, heightToOutput uint64) error

SavePayloadsToFile given a block height and file path writes all the payloads for that snapshot height to the file in json format.

func SnapshotData

func SnapshotData(dbPath string, heightToOutput uint64) ([]Data, []Data, error)

SnapshotData returns an overview of each snapshot saved to disk, namely the height and its hash.

Types

type Data added in v0.62.0

type Data struct {
	Height  uint64 `json:"height,omitempty"`
	Version int64  `json:"version"`
	Size    int64  `json:"size"`
	Hash    string `json:"hash"`
}

Data is a representation of the information we scrape from the avl tree.

type Database added in v0.72.0

type Database interface {
	cometbftdb.DB
	Clear() error
}

Jump to

Keyboard shortcuts

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