Skip to content

Commit ac1ddce

Browse files
committed
cmd/utils, internal/flags: deprecate flag XDCx-dbName and XDCx.dbName
1 parent e6b1fe9 commit ac1ddce

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

cmd/utils/flags.go

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -848,15 +848,6 @@ var (
848848
Usage: "Enable slave mode",
849849
Category: flags.XdcCategory,
850850
}
851-
852-
// XDCX settings
853-
XDCXDBNameFlag = &cli.StringFlag{
854-
Name: "XDCx-dbName",
855-
Aliases: []string{"XDCx.dbName"},
856-
Usage: "Database name for XDCX",
857-
Value: "XDCdex",
858-
Category: flags.XdcxCategory,
859-
}
860851
)
861852

862853
var (
@@ -1454,12 +1445,11 @@ func SetXDCXConfig(ctx *cli.Context, cfg *XDCx.Config, XDCDataDir string) {
14541445
}
14551446
// XDCx datadir: XDCDataDir/XDCx
14561447
cfg.DataDir = filepath.Join(XDCDataDir, "XDCx")
1457-
log.Info("XDCX datadir", "path", cfg.DataDir)
14581448
if ctx.IsSet(XDCXDBNameFlag.Name) {
1459-
cfg.DBName = ctx.String(XDCXDBNameFlag.Name)
1460-
} else {
1461-
cfg.DBName = XDCXDBNameFlag.Value
1449+
log.Warn("The flag XDCx-dbName or XDCx.dbName is deprecated, please remove this flag")
14621450
}
1451+
cfg.DBName = "XDCdex"
1452+
log.Info("Set XDCX config", "DataDir", cfg.DataDir, "DBName", cfg.DBName)
14631453
}
14641454

14651455
// SetEthConfig applies eth-related command line flags to the config.

cmd/utils/flags_legacy.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ var DeprecatedFlags = []cli.Flag{
3838
LogDebugFlag,
3939
MiningEnabledFlag,
4040
XDCXDataDirFlag,
41+
XDCXDBNameFlag,
4142
LightServFlag,
4243
LightPeersFlag,
4344
}
@@ -83,21 +84,29 @@ var (
8384
LightServFlag = &cli.IntFlag{
8485
Name: "light-serv",
8586
Aliases: []string{"lightserv"},
86-
Usage: "Maximum percentage of time allowed for serving LES requests (0-90)",
87+
Usage: "Maximum percentage of time allowed for serving LES requests (0-90) (deprecated)",
8788
Value: ethconfig.Defaults.LightServ,
8889
Category: flags.DeprecatedCategory,
8990
}
9091
LightPeersFlag = &cli.IntFlag{
9192
Name: "light-peers",
9293
Aliases: []string{"lightpeers"},
93-
Usage: "Maximum number of LES client peers",
94+
Usage: "Maximum number of LES client peers (deprecated)",
9495
Value: ethconfig.Defaults.LightPeers,
9596
Category: flags.DeprecatedCategory,
9697
}
97-
// Deprecated Oct 2024
98+
// Deprecated July 2025
9899
EnablePersonal = &cli.BoolFlag{
99100
Name: "rpc.enabledeprecatedpersonal",
100-
Usage: "This used to enable the 'personal' namespace.",
101+
Usage: "This used to enable the 'personal' namespace (deprecated)",
102+
Category: flags.DeprecatedCategory,
103+
}
104+
// Deprecated November 2025
105+
XDCXDBNameFlag = &cli.StringFlag{
106+
Name: "XDCx-dbName",
107+
Aliases: []string{"XDCx.dbName"},
108+
Usage: "Database name for XDCX (deprecated)",
109+
Value: "XDCdex",
101110
Category: flags.DeprecatedCategory,
102111
}
103112
)

internal/flags/categories.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const (
3535
MiscCategory = "MISC"
3636
DeprecatedCategory = "ALIASED (deprecated)"
3737
XdcCategory = "XDC"
38-
XdcxCategory = "XDCx"
3938
)
4039

4140
func init() {

0 commit comments

Comments
 (0)