mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 09:50:45 +00:00
cmd/utils: deprecate flag enable-0x-prefix (#1829)
This commit is contained in:
parent
66e96b507c
commit
fd78323211
2 changed files with 12 additions and 7 deletions
|
|
@ -831,12 +831,6 @@ var (
|
||||||
}
|
}
|
||||||
|
|
||||||
// XDC settings
|
// XDC settings
|
||||||
Enable0xPrefixFlag = &cli.BoolFlag{
|
|
||||||
Name: "enable-0x-prefix",
|
|
||||||
Usage: "Address use 0x-prefix (Deprecated: this is on by default, to use xdc prefix use --enable-xdc-prefix)",
|
|
||||||
Value: true,
|
|
||||||
Category: flags.XdcCategory,
|
|
||||||
}
|
|
||||||
EnableXDCPrefixFlag = &cli.BoolFlag{
|
EnableXDCPrefixFlag = &cli.BoolFlag{
|
||||||
Name: "enable-xdc-prefix",
|
Name: "enable-xdc-prefix",
|
||||||
Usage: "Address use xdc-prefix (default = false)",
|
Usage: "Address use xdc-prefix (default = false)",
|
||||||
|
|
@ -1325,7 +1319,10 @@ func SetP2PConfig(ctx *cli.Context, cfg *p2p.Config) {
|
||||||
|
|
||||||
// SetNodeConfig applies node-related command line flags to the config.
|
// SetNodeConfig applies node-related command line flags to the config.
|
||||||
func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
|
func SetNodeConfig(ctx *cli.Context, cfg *node.Config) {
|
||||||
flags.CheckExclusive(ctx, Enable0xPrefixFlag, EnableXDCPrefixFlag)
|
if ctx.IsSet(Enable0xPrefixFlag.Name) {
|
||||||
|
log.Warn("The flag enable-0x-prefix is deprecated, please remove this flag")
|
||||||
|
flags.CheckExclusive(ctx, Enable0xPrefixFlag, EnableXDCPrefixFlag)
|
||||||
|
}
|
||||||
SetP2PConfig(ctx, &cfg.P2P)
|
SetP2PConfig(ctx, &cfg.P2P)
|
||||||
setIPC(ctx, cfg)
|
setIPC(ctx, cfg)
|
||||||
setHTTP(ctx, cfg)
|
setHTTP(ctx, cfg)
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ var DeprecatedFlags = []cli.Flag{
|
||||||
XDCXDataDirFlag,
|
XDCXDataDirFlag,
|
||||||
LightServFlag,
|
LightServFlag,
|
||||||
LightPeersFlag,
|
LightPeersFlag,
|
||||||
|
Enable0xPrefixFlag,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -100,6 +101,13 @@ var (
|
||||||
Usage: "This used to enable the 'personal' namespace.",
|
Usage: "This used to enable the 'personal' namespace.",
|
||||||
Category: flags.DeprecatedCategory,
|
Category: flags.DeprecatedCategory,
|
||||||
}
|
}
|
||||||
|
// Deprecated November 2025
|
||||||
|
Enable0xPrefixFlag = &cli.BoolFlag{
|
||||||
|
Name: "enable-0x-prefix",
|
||||||
|
Usage: "Address use 0x-prefix (Deprecated: this is on by default, to use xdc prefix use --enable-xdc-prefix)",
|
||||||
|
Value: true,
|
||||||
|
Category: flags.DeprecatedCategory,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
// showDeprecated displays deprecated flags that will be soon removed from the codebase.
|
// showDeprecated displays deprecated flags that will be soon removed from the codebase.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue