mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-15 16:33:47 +00:00
added ancient datadir flag and toml field, need to decide on default value and update the conversion script
This commit is contained in:
parent
6cd5d15a45
commit
e3303294b4
2 changed files with 14 additions and 0 deletions
|
|
@ -53,6 +53,9 @@ type Config struct {
|
||||||
// DataDir is the directory to store the state in
|
// DataDir is the directory to store the state in
|
||||||
DataDir string `hcl:"datadir,optional" toml:"datadir,optional"`
|
DataDir string `hcl:"datadir,optional" toml:"datadir,optional"`
|
||||||
|
|
||||||
|
// Ancient is the directory to store the state in
|
||||||
|
Ancient string `hcl:"ancient,optional" toml:"ancient,optional"`
|
||||||
|
|
||||||
// KeyStoreDir is the directory to store keystores
|
// KeyStoreDir is the directory to store keystores
|
||||||
KeyStoreDir string `hcl:"keystore,optional" toml:"keystore,optional"`
|
KeyStoreDir string `hcl:"keystore,optional" toml:"keystore,optional"`
|
||||||
|
|
||||||
|
|
@ -398,6 +401,7 @@ func DefaultConfig() *Config {
|
||||||
RequiredBlocks: map[string]string{},
|
RequiredBlocks: map[string]string{},
|
||||||
LogLevel: "INFO",
|
LogLevel: "INFO",
|
||||||
DataDir: DefaultDataDir(),
|
DataDir: DefaultDataDir(),
|
||||||
|
Ancient: "",
|
||||||
P2P: &P2PConfig{
|
P2P: &P2PConfig{
|
||||||
MaxPeers: 50,
|
MaxPeers: 50,
|
||||||
MaxPendPeers: 50,
|
MaxPendPeers: 50,
|
||||||
|
|
@ -879,6 +883,10 @@ func (c *Config) buildEth(stack *node.Node, accountManager *accounts.Manager) (*
|
||||||
n.BorLogs = c.BorLogs
|
n.BorLogs = c.BorLogs
|
||||||
n.DatabaseHandles = dbHandles
|
n.DatabaseHandles = dbHandles
|
||||||
|
|
||||||
|
if c.Ancient != "" {
|
||||||
|
n.DatabaseFreezer = c.Ancient
|
||||||
|
}
|
||||||
|
|
||||||
return &n, nil
|
return &n, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,12 @@ func (c *Command) Flags() *flagset.Flagset {
|
||||||
Value: &c.cliConfig.DataDir,
|
Value: &c.cliConfig.DataDir,
|
||||||
Default: c.cliConfig.DataDir,
|
Default: c.cliConfig.DataDir,
|
||||||
})
|
})
|
||||||
|
f.StringFlag(&flagset.StringFlag{
|
||||||
|
Name: "datadir.ancient",
|
||||||
|
Usage: "Data directory for ancient chain segments (default = inside chaindata)",
|
||||||
|
Value: &c.cliConfig.Ancient,
|
||||||
|
Default: c.cliConfig.Ancient,
|
||||||
|
})
|
||||||
f.StringFlag(&flagset.StringFlag{
|
f.StringFlag(&flagset.StringFlag{
|
||||||
Name: "keystore",
|
Name: "keystore",
|
||||||
Usage: "Path of the directory where keystores are located",
|
Usage: "Path of the directory where keystores are located",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue