checkpoint

package
v0.0.0-...-9288dcb Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2020 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAlertKeyDbPath

func GetAlertKeyDbPath(dataDir string, chainParams *chaincfg.Params) (dbPath string)

func GetUserCheckpointDbPath

func GetUserCheckpointDbPath(dataDir string, chainParams *chaincfg.Params) (dbPath string)

func GetVolatileCheckpointDbPath

func GetVolatileCheckpointDbPath(dataDir string, chainParams *chaincfg.Params) (dbPath string)

Types

type AlertKey

type AlertKey struct {
	Akdb *leveldb.DB
}

func GetAlertKeyDbInstance

func GetAlertKeyDbInstance() *AlertKey

func (*AlertKey) CloseDB

func (ak *AlertKey) CloseDB()

func (*AlertKey) IsValid

func (ak *AlertKey) IsValid(chainParams *chaincfg.Params) bool

Add alertkey if it is not in database. Returns true if both of the public keys alertkey are OK.

func (*AlertKey) OpenDB

func (ak *AlertKey) OpenDB(dataDir string, chainParams *chaincfg.Params) (*leveldb.DB, error)

func (*AlertKey) Set

func (ak *AlertKey) Set(key string)

Alertkey is disabled when you came here.irreversible.

type UserCheckpoint

type UserCheckpoint struct {
	Ucdb *leveldb.DB
}

func GetUserCheckpointDbInstance

func GetUserCheckpointDbInstance() *UserCheckpoint

func (*UserCheckpoint) Add

func (uc *UserCheckpoint) Add(height int64, hash string)

func (*UserCheckpoint) CloseDB

func (uc *UserCheckpoint) CloseDB()

Basically it is called only at the end.

func (*UserCheckpoint) Delete

func (uc *UserCheckpoint) Delete(height int64)

func (*UserCheckpoint) GetMaxCheckpointHeight

func (uc *UserCheckpoint) GetMaxCheckpointHeight() (height int64)

func (*UserCheckpoint) OpenDB

func (uc *UserCheckpoint) OpenDB(dataDir string, chainParams *chaincfg.Params) (*leveldb.DB, error)

open usercheckpointDB. Basically it is called only at startup.

type VolatileCheckpoint

type VolatileCheckpoint struct {
	Vcdb *leveldb.DB
}

func GetVolatileCheckpointDbInstance

func GetVolatileCheckpointDbInstance() *VolatileCheckpoint

func (*VolatileCheckpoint) ClearDB

func (vc *VolatileCheckpoint) ClearDB()

func (*VolatileCheckpoint) CloseDB

func (vc *VolatileCheckpoint) CloseDB()

close volatilecheckpointDB. Basically it is called only at the end.

func (*VolatileCheckpoint) OpenDB

func (vc *VolatileCheckpoint) OpenDB(dataDir string, chainParams *chaincfg.Params) (*leveldb.DB, error)

open volatilecheckpointDB. Basically it is called only at startup.

func (*VolatileCheckpoint) Set

func (vc *VolatileCheckpoint) Set(height int64, hash string)

Jump to

Keyboard shortcuts

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