From ccf8ff2e640955a40fa28cb25bf91e41bbff32dc Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Wed, 19 Mar 2025 15:32:57 +0800 Subject: [PATCH] cmd/utils, eth/ethconfig: remove flag docroot --- cmd/utils/flags.go | 9 --------- eth/ethconfig/config.go | 3 --- eth/ethconfig/gen_config.go | 6 ------ 3 files changed, 18 deletions(-) diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index f22aefd285..b0f3132919 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -138,12 +138,6 @@ var ( Usage: "Custom node name", Category: flags.NetworkingCategory, } - DocRootFlag = &flags.DirectoryFlag{ - Name: "docroot", - Usage: "Document Root for HTTPClient file scheme", - Value: flags.DirectoryString(flags.HomeDir()), - Category: flags.APICategory, - } SyncModeFlag = &cli.StringFlag{ Name: "syncmode", @@ -1402,9 +1396,6 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) { if ctx.IsSet(MinerThreadsFlag.Name) { cfg.MinerThreads = ctx.Int(MinerThreadsFlag.Name) } - if ctx.IsSet(DocRootFlag.Name) { - cfg.DocRoot = ctx.String(DocRootFlag.Name) - } if ctx.IsSet(RPCGlobalGasCapFlag.Name) { cfg.RPCGasCap = ctx.Uint64(RPCGlobalGasCapFlag.Name) } diff --git a/eth/ethconfig/config.go b/eth/ethconfig/config.go index a3da2a6a01..9cb5c583b1 100644 --- a/eth/ethconfig/config.go +++ b/eth/ethconfig/config.go @@ -136,9 +136,6 @@ type Config struct { // Enables tracking of SHA3 preimages in the VM EnablePreimageRecording bool - // Miscellaneous options - DocRoot string `toml:"-"` - // RPCGasCap is the global gas cap for eth-call variants. RPCGasCap uint64 diff --git a/eth/ethconfig/gen_config.go b/eth/ethconfig/gen_config.go index 5258eb1b2c..da2e185082 100644 --- a/eth/ethconfig/gen_config.go +++ b/eth/ethconfig/gen_config.go @@ -40,7 +40,6 @@ func (c Config) MarshalTOML() (interface{}, error) { TxPool txpool.Config GPO gasprice.Config EnablePreimageRecording bool - DocRoot string `toml:"-"` RPCGasCap uint64 RPCTxFeeCap float64 } @@ -65,7 +64,6 @@ func (c Config) MarshalTOML() (interface{}, error) { enc.TxPool = c.TxPool enc.GPO = c.GPO enc.EnablePreimageRecording = c.EnablePreimageRecording - enc.DocRoot = c.DocRoot enc.RPCGasCap = c.RPCGasCap enc.RPCTxFeeCap = c.RPCTxFeeCap return &enc, nil @@ -94,7 +92,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { TxPool *txpool.Config GPO *gasprice.Config EnablePreimageRecording *bool - DocRoot *string `toml:"-"` RPCGasCap *uint64 RPCTxFeeCap *float64 } @@ -162,9 +159,6 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error { if dec.EnablePreimageRecording != nil { c.EnablePreimageRecording = *dec.EnablePreimageRecording } - if dec.DocRoot != nil { - c.DocRoot = *dec.DocRoot - } if dec.RPCGasCap != nil { c.RPCGasCap = *dec.RPCGasCap }