commons

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2019 License: GPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExportChainN

func ExportChainN(blockchain *core.BlockChain, fn string, first, last uint64) error

ExportChain exports a blockchain into the specified file, truncating any data already present in the file.

func ExportPreimages

func ExportPreimages(db *database.LDBDatabase, fn string) error

ExportPreimages exports all known hash preimages into the specified file, truncating any data already present in the file.

func Fatalf

func Fatalf(format string, args ...interface{})

Fatalf formats a message to standard error and exits the program. The message is also printed to standard output if standard error is redirected to a different file.

func ImportChain

func ImportChain(chain *core.BlockChain, fn string) error

func ImportPreimages

func ImportPreimages(db *database.LDBDatabase, fn string) error

ImportPreimages imports a batch of exported hash preimages into the database.

func MakeChainDatabase

func MakeChainDatabase(ctx *cli.Context, n *node.Node, databaseCache int) database.Database

MakeChainDatabase open an LevelDB using the flags passed to the client and will hard crash if it fails. It creates a new one if the database doesn't exist.

func MakeGenesis

func MakeGenesis(ctx *cli.Context) *core.Genesis

MakeGenesis builds a genesis block object.

func OpenChain

func OpenChain(ctx *cli.Context, n *node.Node, cfg *cpc.Config) (chain *core.BlockChain, chainDb database.Database)

OpenChain opens a blockchain

func ReadMessage added in v0.4.3

func ReadMessage() (string, error)

func ReadPassword

func ReadPassword(prompt string, needConfirm bool) (string, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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