chainstate

package
v0.0.0-...-d9e5eab Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: ISC Imports: 8 Imported by: 0

Documentation

Overview

Package chainstate implements the hashchain state for the Bitum updater.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.

func UseLogger

func UseLogger(logger slog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using slog.

Types

type ChainState

type ChainState struct {
	// contains filtered or unexported fields
}

ChainState holds the hashchain state for the Bitum updater.

func New

func New(dataDir string) (*ChainState, error)

New returns a new ChainState.

func (*ChainState) Close

func (cs *ChainState) Close()

Close chain state.

func (*ChainState) EntryIsKnown

func (cs *ChainState) EntryIsKnown(hashchainEntry string) bool

EntryIsKnown returns truf the given hashchainEntry is known and false otherwise.

func (*ChainState) Head

func (cs *ChainState) Head() [32]byte

Head returns the hash of the last known hashchain entry.

Jump to

Keyboard shortcuts

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