mine

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: ISC Imports: 19 Imported by: 0

Documentation

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 UseLogger is called.

func FromFile

func FromFile(jsonFile string, consensusConfig *consensus.Config, rpcClient *rpc.Client, dataDir string) error

FromFile mines all blocks as described by `jsonFile`

func SolveBlock

func SolveBlock(block *externalapi.DomainBlock)

SolveBlock increments the given block's nonce until it matches the difficulty requirements in its bits field

func UseLogger

func UseLogger(backend *logger.Backend, level logger.Level)

UseLogger uses a specified Logger to output package logging info.

Types

type JSONBlock

type JSONBlock struct {
	ID      string   `json:"id"`
	Parents []string `json:"parents"`
}

JSONBlock is a json representation of a block in mine format

Jump to

Keyboard shortcuts

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