all: replace override.prague with osaka (#32093)

replace `--override.prague` with `--override.osaka`

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng 2025-06-27 15:18:05 +08:00 committed by GitHub
parent 668c3a7278
commit 8e17b371fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 23 additions and 23 deletions

View file

@ -58,7 +58,7 @@ var (
ArgsUsage: "<genesisPath>",
Flags: slices.Concat([]cli.Flag{
utils.CachePreimagesFlag,
utils.OverridePrague,
utils.OverrideOsaka,
utils.OverrideVerkle,
}, utils.DatabaseFlags),
Description: `
@ -269,9 +269,9 @@ func initGenesis(ctx *cli.Context) error {
defer stack.Close()
var overrides core.ChainOverrides
if ctx.IsSet(utils.OverridePrague.Name) {
v := ctx.Uint64(utils.OverridePrague.Name)
overrides.OverridePrague = &v
if ctx.IsSet(utils.OverrideOsaka.Name) {
v := ctx.Uint64(utils.OverrideOsaka.Name)
overrides.OverrideOsaka = &v
}
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)

View file

@ -223,9 +223,9 @@ func constructDevModeBanner(ctx *cli.Context, cfg gethConfig) string {
// makeFullNode loads geth configuration and creates the Ethereum backend.
func makeFullNode(ctx *cli.Context) *node.Node {
stack, cfg := makeConfigNode(ctx)
if ctx.IsSet(utils.OverridePrague.Name) {
v := ctx.Uint64(utils.OverridePrague.Name)
cfg.Eth.OverridePrague = &v
if ctx.IsSet(utils.OverrideOsaka.Name) {
v := ctx.Uint64(utils.OverrideOsaka.Name)
cfg.Eth.OverrideOsaka = &v
}
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)

View file

@ -62,7 +62,7 @@ var (
utils.NoUSBFlag, // deprecated
utils.USBFlag,
utils.SmartCardDaemonPathFlag,
utils.OverridePrague,
utils.OverrideOsaka,
utils.OverrideVerkle,
utils.EnablePersonal, // deprecated
utils.TxPoolLocalsFlag,

View file

@ -243,9 +243,9 @@ var (
Value: 2048,
Category: flags.EthCategory,
}
OverridePrague = &cli.Uint64Flag{
Name: "override.prague",
Usage: "Manually specify the Prague fork timestamp, overriding the bundled setting",
OverrideOsaka = &cli.Uint64Flag{
Name: "override.osaka",
Usage: "Manually specify the Osaka fork timestamp, overriding the bundled setting",
Category: flags.EthCategory,
}
OverrideVerkle = &cli.Uint64Flag{

View file

@ -258,7 +258,7 @@ func (e *GenesisMismatchError) Error() string {
// ChainOverrides contains the changes to chain config.
type ChainOverrides struct {
OverridePrague *uint64
OverrideOsaka *uint64
OverrideVerkle *uint64
}
@ -267,8 +267,8 @@ func (o *ChainOverrides) apply(cfg *params.ChainConfig) error {
if o == nil || cfg == nil {
return nil
}
if o.OverridePrague != nil {
cfg.PragueTime = o.OverridePrague
if o.OverrideOsaka != nil {
cfg.OsakaTime = o.OverrideOsaka
}
if o.OverrideVerkle != nil {
cfg.VerkleTime = o.OverrideVerkle

View file

@ -253,8 +253,8 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
}
// Override the chain config with provided settings.
var overrides core.ChainOverrides
if config.OverridePrague != nil {
overrides.OverridePrague = config.OverridePrague
if config.OverrideOsaka != nil {
overrides.OverrideOsaka = config.OverrideOsaka
}
if config.OverrideVerkle != nil {
overrides.OverrideVerkle = config.OverrideVerkle

View file

@ -158,8 +158,8 @@ type Config struct {
// send-transaction variants. The unit is ether.
RPCTxFeeCap float64
// OverridePrague (TODO: remove after the fork)
OverridePrague *uint64 `toml:",omitempty"`
// OverrideOsaka (TODO: remove after the fork)
OverrideOsaka *uint64 `toml:",omitempty"`
// OverrideVerkle (TODO: remove after the fork)
OverrideVerkle *uint64 `toml:",omitempty"`

View file

@ -54,7 +54,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
RPCGasCap uint64
RPCEVMTimeout time.Duration
RPCTxFeeCap float64
OverridePrague *uint64 `toml:",omitempty"`
OverrideOsaka *uint64 `toml:",omitempty"`
OverrideVerkle *uint64 `toml:",omitempty"`
}
var enc Config
@ -95,7 +95,7 @@ func (c Config) MarshalTOML() (interface{}, error) {
enc.RPCGasCap = c.RPCGasCap
enc.RPCEVMTimeout = c.RPCEVMTimeout
enc.RPCTxFeeCap = c.RPCTxFeeCap
enc.OverridePrague = c.OverridePrague
enc.OverrideOsaka = c.OverrideOsaka
enc.OverrideVerkle = c.OverrideVerkle
return &enc, nil
}
@ -140,7 +140,7 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
RPCGasCap *uint64
RPCEVMTimeout *time.Duration
RPCTxFeeCap *float64
OverridePrague *uint64 `toml:",omitempty"`
OverrideOsaka *uint64 `toml:",omitempty"`
OverrideVerkle *uint64 `toml:",omitempty"`
}
var dec Config
@ -258,8 +258,8 @@ func (c *Config) UnmarshalTOML(unmarshal func(interface{}) error) error {
if dec.RPCTxFeeCap != nil {
c.RPCTxFeeCap = *dec.RPCTxFeeCap
}
if dec.OverridePrague != nil {
c.OverridePrague = dec.OverridePrague
if dec.OverrideOsaka != nil {
c.OverrideOsaka = dec.OverrideOsaka
}
if dec.OverrideVerkle != nil {
c.OverrideVerkle = dec.OverrideVerkle