snapshotdb

package
v0.0.0-...-141c82c Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: MIT 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, outputPath 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

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.

Jump to

Keyboard shortcuts

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