snapshotdb

package
v0.78.3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: AGPL-3.0 Imports: 17 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 SetProtocolUpgrade added in v0.74.0

func SetProtocolUpgrade(vegaPaths paths.Paths) error

SetProtocolUpgrade will take the latest snapshot in the tree and rewrites it with the protocolUpgrade flag set to true so that we can pretend that the snapshot was taken for a upgrade to help with testing.

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