chainservice

package
v0.0.0-...-ddb1edc Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TorConfig *tor.TorConfig
)

Functions

func BoltCopy

func BoltCopy(srcfile, destfile string, skip skipFunc) error

func Bootstrap

func Bootstrap(workingDir string) error

Bootstrap is populating neutrino data (flat files and db) with predefined checkpoints to make the sync process a lot faster. Instad of synching from the genesis block, it is now done down to a checkpoint determined by the wallet birthday.

func Bootstrapped

func Bootstrapped(workingDir string) (bool, error)

Bootstrapped returns true if bootstrap was done, false otherwise.

func ChainParams

func ChainParams(network string) (*chaincfg.Params, error)

func Get

func Get(workingDir string, breezDB *db.DB) (cs *neutrino.ChainService, cleanupFn func() error, err error)

Get returned a reusable ChainService

func GetNeutrinoDB

func GetNeutrinoDB(workingDir string) (string, walletdb.DB, error)

func ResetChainService

func ResetChainService(workingDir string) error

ResetChainService deletes neutrino headers/cfheaders and the db so the process of synching will start from the beginning. It allows the node to recover in case some filters/headers were skipped due to unexpected error.

func SetTor

func SetTor(t *tor.TorConfig, active bool) bool

func TestPeer

func TestPeer(peer string) error

Types

type Checkpoint

type Checkpoint struct {
	Height       uint32
	BlockHeader  *wire.BlockHeader
	FilterHeader *chainhash.Hash
}

Checkpoint is a predefined block header and filter header

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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