sync

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BlocksToStore = 40
)

Variables

This section is empty.

Functions

func CheckHNSDVersion added in v0.0.4

func CheckHNSDVersion() error

func GetRoots

func GetRoots(pathToExecutable string, confPath string, pathToCheckpoint string)

func PeriodicallySync added in v0.0.4

func PeriodicallySync(interval time.Duration, pathToExecutable, confPath, pathToCheckpoint string)

Types

type BlockInfo

type BlockInfo struct {
	Height    uint32 `json:"height"`
	Timestamp uint64 `json:"timestamp"`
	TreeRoot  string `json:"tree_root"`
}

func ReadStoredRoots

func ReadStoredRoots(filepath string) ([]BlockInfo, error)

TODO check if there is more than a week between sync then fail lookup have a flag to override this failing behaviour reads local file and get Roots object from it

Jump to

Keyboard shortcuts

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