Documentation
¶
Overview ¶
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
Package utils contains internal helper functions for go-ethereum commands.
Index ¶
- Variables
- func CheckExclusive(ctx *cli.Context, args ...interface{})
- func ExportAppendChain(blockchain *core.BlockChain, fn string, first uint64, last uint64) error
- func ExportChain(blockchain *core.BlockChain, fn string) error
- func ExportPreimages(db ethdb.Database, fn string) error
- func Fatalf(format string, args ...interface{})
- func GetPassPhrase(text string, confirmation bool) string
- func GetPassPhraseWithList(text string, confirmation bool, index int, passwords []string) string
- func GlobalBig(ctx *cli.Context, name string) *big.Int
- func HomeDir() string
- func ImportChain(chain *core.BlockChain, fn string) error
- func ImportPreimages(db ethdb.Database, fn string) error
- func MakeAddress(ks *keystore.KeyStore, account string) (accounts.Account, error)
- func MakeChain(ctx *cli.Context, stack *node.Node) (chain *core.BlockChain, chainDb ethdb.Database)
- func MakeChainDatabase(ctx *cli.Context, stack *node.Node, readonly bool) ethdb.Database
- func MakeConsolePreloads(ctx *cli.Context) []string
- func MakeDataDir(ctx *cli.Context) string
- func MakeDatabaseHandles() int
- func MakeGenesis(ctx *cli.Context) *core.Genesis
- func MakePasswordList(ctx *cli.Context) []string
- func MigrateFlags(action func(ctx *cli.Context) error) func(*cli.Context) error
- func RegisterEthService(stack *node.Node, cfg *ethconfig.Config) (ethapi.Backend, *eth.Ethereum)
- func RegisterEthStatsService(stack *node.Node, backend ethapi.Backend, url string)
- func RegisterGraphQLService(stack *node.Node, backend ethapi.Backend, cfg node.Config)
- func SetDNSDiscoveryDefaults(cfg *ethconfig.Config, genesis common.Hash)
- func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config)
- func SetNodeConfig(ctx *cli.Context, cfg *node.Config)
- func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config)
- func SetupMetrics(ctx *cli.Context)
- func SplitAndTrim(input string) (ret []string)
- func SplitTagsFlag(tagsFlag string) map[string]string
- func StartNode(ctx *cli.Context, stack *node.Node)
- type BigFlag
- type DirectoryFlag
- type DirectoryString
- type TextMarshaler
- type TextMarshalerFlag
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // General settings DataDirFlag = DirectoryFlag{ Name: "datadir", Usage: "Data directory for the databases and keystore", Value: DirectoryString(node.DefaultDataDir()), } AncientFlag = DirectoryFlag{ Name: "datadir.ancient", Usage: "Data directory for ancient chain segments (default = inside chaindata)", } MinFreeDiskSpaceFlag = DirectoryFlag{ Name: "datadir.minfreedisk", Usage: "Minimum free disk space in MB, once reached triggers auto shut down (default = --cache.gc converted to MB, 0 = disabled)", } KeyStoreDirFlag = DirectoryFlag{ Name: "keystore", Usage: "Directory for the keystore (default = inside the datadir)", } NoUSBFlag = cli.BoolFlag{ Name: "nousb", Usage: "Disables monitoring for and managing USB hardware wallets (deprecated)", } USBFlag = cli.BoolFlag{ Name: "usb", Usage: "Enable monitoring and management of USB hardware wallets", } SmartCardDaemonPathFlag = cli.StringFlag{ Name: "pcscdpath", Usage: "Path to the smartcard daemon (pcscd) socket file", Value: pcsclite.PCSCDSockName, } NetworkIdFlag = cli.Uint64Flag{ Name: "networkid", Usage: "Explicitly set network id (integer)(For testnets: use --ropsten, --rinkeby, --goerli instead)", Value: ethconfig.Defaults.NetworkId, } MainnetFlag = cli.BoolFlag{ Name: "mainnet", Usage: "Ethereum mainnet", } GoerliFlag = cli.BoolFlag{ Name: "goerli", Usage: "Görli network: pre-configured proof-of-authority test network", } CalaverasFlag = cli.BoolFlag{ Name: "calaveras", Usage: "Calaveras network: pre-configured proof-of-authority shortlived test network.", } RinkebyFlag = cli.BoolFlag{ Name: "rinkeby", Usage: "Rinkeby network: pre-configured proof-of-authority test network", } RopstenFlag = cli.BoolFlag{ Name: "ropsten", Usage: "Ropsten network: pre-configured proof-of-work test network", } DeveloperFlag = cli.BoolFlag{ Name: "dev", Usage: "Ephemeral proof-of-authority network with a pre-funded developer account, mining enabled", } DeveloperPeriodFlag = cli.IntFlag{ Name: "dev.period", Usage: "Block period to use in developer mode (0 = mine only if transaction pending)", } IdentityFlag = cli.StringFlag{ Name: "identity", Usage: "Custom node name", } DocRootFlag = DirectoryFlag{ Name: "docroot", Usage: "Document Root for HTTPClient file scheme", Value: DirectoryString(HomeDir()), } ExitWhenSyncedFlag = cli.BoolFlag{ Name: "exitwhensynced", Usage: "Exits after block synchronisation completes", } IterativeOutputFlag = cli.BoolTFlag{ Name: "iterative", Usage: "Print streaming JSON iteratively, delimited by newlines", } ExcludeStorageFlag = cli.BoolFlag{ Name: "nostorage", Usage: "Exclude storage entries (save db lookups)", } IncludeIncompletesFlag = cli.BoolFlag{ Name: "incompletes", Usage: "Include accounts for which we don't have the address (missing preimage)", } ExcludeCodeFlag = cli.BoolFlag{ Name: "nocode", Usage: "Exclude contract code (save db lookups)", } StartKeyFlag = cli.StringFlag{ Name: "start", Usage: "Start position. Either a hash or address", Value: "0x0000000000000000000000000000000000000000000000000000000000000000", } DumpLimitFlag =