mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
Add keystore option to cli
This commit is contained in:
parent
342bf3089e
commit
33e646eea1
3 changed files with 11 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ The ```bor server``` command runs the Bor client.
|
|||
|
||||
- ```datadir```: Path of the data directory to store information
|
||||
|
||||
- ```keystore```: Path of the directory to store keystores
|
||||
|
||||
- ```config```: File for the config file
|
||||
|
||||
- ```syncmode```: Blockchain sync mode ("fast", "full", or "snap")
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ type Config struct {
|
|||
// DataDir is the directory to store the state in
|
||||
DataDir string `hcl:"data-dir,optional"`
|
||||
|
||||
// KeyStoreDir is the directory to store keystores
|
||||
KeyStoreDir string `hcl:"keystore-dir,optional"`
|
||||
|
||||
// SyncMode selects the sync protocol
|
||||
SyncMode string `hcl:"sync-mode,optional"`
|
||||
|
||||
|
|
@ -894,6 +897,7 @@ func (c *Config) buildNode() (*node.Config, error) {
|
|||
cfg := &node.Config{
|
||||
Name: clientIdentifier,
|
||||
DataDir: c.DataDir,
|
||||
KeyStoreDir: c.KeyStoreDir,
|
||||
UseLightweightKDF: c.Accounts.UseLightweightKDF,
|
||||
InsecureUnlockAllowed: c.Accounts.AllowInsecureUnlock,
|
||||
Version: params.VersionWithCommit(gitCommit, gitDate),
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ func (c *Command) Flags() *flagset.Flagset {
|
|||
Value: &c.cliConfig.DataDir,
|
||||
Default: c.cliConfig.DataDir,
|
||||
})
|
||||
f.StringFlag(&flagset.StringFlag{
|
||||
Name: "keystore",
|
||||
Usage: "Path of the directory to store keystores",
|
||||
Value: &c.cliConfig.KeyStoreDir,
|
||||
})
|
||||
f.SliceStringFlag(&flagset.SliceStringFlag{
|
||||
Name: "config",
|
||||
Usage: "File for the config file",
|
||||
|
|
|
|||
Loading…
Reference in a new issue