Documentation ¶
Index ¶
- func ExportChainN(blockchain *core.BlockChain, fn string, first, last uint64) error
- func ExportPreimages(db *database.LDBDatabase, fn string) error
- func Fatalf(format string, args ...interface{})
- func ImportChain(chain *core.BlockChain, fn string) error
- func ImportPreimages(db *database.LDBDatabase, fn string) error
- func MakeChainDatabase(ctx *cli.Context, n *node.Node, databaseCache int) database.Database
- func MakeGenesis(ctx *cli.Context) *core.Genesis
- func OpenChain(ctx *cli.Context, n *node.Node, cfg *cpc.Config) (chain *core.BlockChain, chainDb database.Database)
- func ReadPassword(prompt string, needConfirm bool) (string, error)
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 ¶
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 ¶
MakeGenesis builds a genesis block object.
Types ¶
This section is empty.