mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 07:37:20 +00:00
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:
parent
668c3a7278
commit
8e17b371fd
8 changed files with 23 additions and 23 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ var (
|
|||
utils.NoUSBFlag, // deprecated
|
||||
utils.USBFlag,
|
||||
utils.SmartCardDaemonPathFlag,
|
||||
utils.OverridePrague,
|
||||
utils.OverrideOsaka,
|
||||
utils.OverrideVerkle,
|
||||
utils.EnablePersonal, // deprecated
|
||||
utils.TxPoolLocalsFlag,
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"`
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue