mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 09:50:45 +00:00
cmd/utils, internal/flags: deprecate flag XDCx-dbName and XDCx.dbName (#1823)
This commit is contained in:
parent
47501c8834
commit
01b8fce6e3
3 changed files with 18 additions and 20 deletions
|
|
@ -837,15 +837,6 @@ var (
|
||||||
Value: false,
|
Value: false,
|
||||||
Category: flags.XdcCategory,
|
Category: flags.XdcCategory,
|
||||||
}
|
}
|
||||||
|
|
||||||
// XDCX settings
|
|
||||||
XDCXDBNameFlag = &cli.StringFlag{
|
|
||||||
Name: "XDCx-dbName",
|
|
||||||
Aliases: []string{"XDCx.dbName"},
|
|
||||||
Usage: "Database name for XDCX",
|
|
||||||
Value: "XDCdex",
|
|
||||||
Category: flags.XdcxCategory,
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -1444,14 +1435,13 @@ func SetXDCXConfig(ctx *cli.Context, cfg *XDCx.Config, XDCDataDir string) {
|
||||||
if ctx.IsSet(XDCXDataDirFlag.Name) {
|
if ctx.IsSet(XDCXDataDirFlag.Name) {
|
||||||
log.Warn("The flag XDCx-datadir or XDCx.datadir is deprecated, please remove this flag")
|
log.Warn("The flag XDCx-datadir or XDCx.datadir is deprecated, please remove this flag")
|
||||||
}
|
}
|
||||||
|
if ctx.IsSet(XDCXDBNameFlag.Name) {
|
||||||
|
log.Warn("The flag XDCx-dbName or XDCx.dbName is deprecated, please remove this flag")
|
||||||
|
}
|
||||||
// XDCx datadir: XDCDataDir/XDCx
|
// XDCx datadir: XDCDataDir/XDCx
|
||||||
cfg.DataDir = filepath.Join(XDCDataDir, "XDCx")
|
cfg.DataDir = filepath.Join(XDCDataDir, "XDCx")
|
||||||
log.Info("XDCX datadir", "path", cfg.DataDir)
|
cfg.DBName = "XDCdex"
|
||||||
if ctx.IsSet(XDCXDBNameFlag.Name) {
|
log.Info("Set XDCX config", "DataDir", cfg.DataDir, "DBName", cfg.DBName)
|
||||||
cfg.DBName = ctx.String(XDCXDBNameFlag.Name)
|
|
||||||
} else {
|
|
||||||
cfg.DBName = XDCXDBNameFlag.Value
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetEthConfig applies eth-related command line flags to the config.
|
// SetEthConfig applies eth-related command line flags to the config.
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ var DeprecatedFlags = []cli.Flag{
|
||||||
LogDebugFlag,
|
LogDebugFlag,
|
||||||
MiningEnabledFlag,
|
MiningEnabledFlag,
|
||||||
XDCXDataDirFlag,
|
XDCXDataDirFlag,
|
||||||
|
XDCXDBNameFlag,
|
||||||
LightServFlag,
|
LightServFlag,
|
||||||
LightPeersFlag,
|
LightPeersFlag,
|
||||||
Enable0xPrefixFlag,
|
Enable0xPrefixFlag,
|
||||||
|
|
@ -84,21 +85,29 @@ var (
|
||||||
LightServFlag = &cli.IntFlag{
|
LightServFlag = &cli.IntFlag{
|
||||||
Name: "light-serv",
|
Name: "light-serv",
|
||||||
Aliases: []string{"lightserv"},
|
Aliases: []string{"lightserv"},
|
||||||
Usage: "Maximum percentage of time allowed for serving LES requests (0-90)",
|
Usage: "Maximum percentage of time allowed for serving LES requests (0-90) (deprecated)",
|
||||||
Value: ethconfig.Defaults.LightServ,
|
Value: ethconfig.Defaults.LightServ,
|
||||||
Category: flags.DeprecatedCategory,
|
Category: flags.DeprecatedCategory,
|
||||||
}
|
}
|
||||||
LightPeersFlag = &cli.IntFlag{
|
LightPeersFlag = &cli.IntFlag{
|
||||||
Name: "light-peers",
|
Name: "light-peers",
|
||||||
Aliases: []string{"lightpeers"},
|
Aliases: []string{"lightpeers"},
|
||||||
Usage: "Maximum number of LES client peers",
|
Usage: "Maximum number of LES client peers (deprecated)",
|
||||||
Value: ethconfig.Defaults.LightPeers,
|
Value: ethconfig.Defaults.LightPeers,
|
||||||
Category: flags.DeprecatedCategory,
|
Category: flags.DeprecatedCategory,
|
||||||
}
|
}
|
||||||
// Deprecated Oct 2024
|
// Deprecated July 2025
|
||||||
EnablePersonal = &cli.BoolFlag{
|
EnablePersonal = &cli.BoolFlag{
|
||||||
Name: "rpc.enabledeprecatedpersonal",
|
Name: "rpc.enabledeprecatedpersonal",
|
||||||
Usage: "This used to enable the 'personal' namespace.",
|
Usage: "This used to enable the 'personal' namespace (deprecated)",
|
||||||
|
Category: flags.DeprecatedCategory,
|
||||||
|
}
|
||||||
|
// Deprecated November 2025
|
||||||
|
XDCXDBNameFlag = &cli.StringFlag{
|
||||||
|
Name: "XDCx-dbName",
|
||||||
|
Aliases: []string{"XDCx.dbName"},
|
||||||
|
Usage: "Database name for XDCX (deprecated)",
|
||||||
|
Value: "XDCdex",
|
||||||
Category: flags.DeprecatedCategory,
|
Category: flags.DeprecatedCategory,
|
||||||
}
|
}
|
||||||
// Deprecated November 2025
|
// Deprecated November 2025
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,6 @@ const (
|
||||||
MiscCategory = "MISC"
|
MiscCategory = "MISC"
|
||||||
DeprecatedCategory = "ALIASED (deprecated)"
|
DeprecatedCategory = "ALIASED (deprecated)"
|
||||||
XdcCategory = "XDC"
|
XdcCategory = "XDC"
|
||||||
XdcxCategory = "XDCx"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue