Skip to content

Commit 4cdd7c8

Browse files
authored
cmd,eth,les: replace Cancun override flag with Prague (ethereum#31341)
It's that time of the cycle, should have this ready to go for mainnet Prague release.
1 parent 9aba689 commit 4cdd7c8

8 files changed

Lines changed: 23 additions & 23 deletions

File tree

cmd/geth/chaincmd.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var (
5050
ArgsUsage: "<genesisPath>",
5151
Flags: slices.Concat([]cli.Flag{
5252
utils.CachePreimagesFlag,
53-
utils.OverrideCancun,
53+
utils.OverridePrague,
5454
utils.OverrideVerkle,
5555
}, utils.DatabaseFlags),
5656
Description: `
@@ -212,9 +212,9 @@ func initGenesis(ctx *cli.Context) error {
212212
defer stack.Close()
213213

214214
var overrides core.ChainOverrides
215-
if ctx.IsSet(utils.OverrideCancun.Name) {
216-
v := ctx.Uint64(utils.OverrideCancun.Name)
217-
overrides.OverrideCancun = &v
215+
if ctx.IsSet(utils.OverridePrague.Name) {
216+
v := ctx.Uint64(utils.OverridePrague.Name)
217+
overrides.OverridePrague = &v
218218
}
219219
if ctx.IsSet(utils.OverrideVerkle.Name) {
220220
v := ctx.Uint64(utils.OverrideVerkle.Name)

cmd/geth/config.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,9 @@ func makeConfigNode(ctx *cli.Context) (*node.Node, gethConfig) {
183183
// makeFullNode loads geth configuration and creates the Ethereum backend.
184184
func makeFullNode(ctx *cli.Context) *node.Node {
185185
stack, cfg := makeConfigNode(ctx)
186-
if ctx.IsSet(utils.OverrideCancun.Name) {
187-
v := ctx.Uint64(utils.OverrideCancun.Name)
188-
cfg.Eth.OverrideCancun = &v
186+
if ctx.IsSet(utils.OverridePrague.Name) {
187+
v := ctx.Uint64(utils.OverridePrague.Name)
188+
cfg.Eth.OverridePrague = &v
189189
}
190190
if ctx.IsSet(utils.OverrideVerkle.Name) {
191191
v := ctx.Uint64(utils.OverrideVerkle.Name)

cmd/geth/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var (
6262
utils.NoUSBFlag, // deprecated
6363
utils.USBFlag,
6464
utils.SmartCardDaemonPathFlag,
65-
utils.OverrideCancun,
65+
utils.OverridePrague,
6666
utils.OverrideVerkle,
6767
utils.EnablePersonal, // deprecated
6868
utils.TxPoolLocalsFlag,

cmd/utils/flags.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ var (
233233
Value: 2048,
234234
Category: flags.EthCategory,
235235
}
236-
OverrideCancun = &cli.Uint64Flag{
237-
Name: "override.cancun",
238-
Usage: "Manually specify the Cancun fork timestamp, overriding the bundled setting",
236+
OverridePrague = &cli.Uint64Flag{
237+
Name: "override.prague",
238+
Usage: "Manually specify the Prague fork timestamp, overriding the bundled setting",
239239
Category: flags.EthCategory,
240240
}
241241
OverrideVerkle = &cli.Uint64Flag{

core/genesis.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ func (e *GenesisMismatchError) Error() string {
256256

257257
// ChainOverrides contains the changes to chain config.
258258
type ChainOverrides struct {
259-
OverrideCancun *uint64
259+
OverridePrague *uint64
260260
OverrideVerkle *uint64
261261
}
262262

@@ -265,8 +265,8 @@ func (o *ChainOverrides) apply(cfg *params.ChainConfig) error {
265265
if o == nil || cfg == nil {
266266
return nil
267267
}
268-
if o.OverrideCancun != nil {
269-
cfg.CancunTime = o.OverrideCancun
268+
if o.OverridePrague != nil {
269+
cfg.PragueTime = o.OverridePrague
270270
}
271271
if o.OverrideVerkle != nil {
272272
cfg.VerkleTime = o.OverrideVerkle

eth/backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
214214
}
215215
// Override the chain config with provided settings.
216216
var overrides core.ChainOverrides
217-
if config.OverrideCancun != nil {
218-
overrides.OverrideCancun = config.OverrideCancun
217+
if config.OverridePrague != nil {
218+
overrides.OverridePrague = config.OverridePrague
219219
}
220220
if config.OverrideVerkle != nil {
221221
overrides.OverrideVerkle = config.OverrideVerkle

eth/ethconfig/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ type Config struct {
148148
// send-transaction variants. The unit is ether.
149149
RPCTxFeeCap float64
150150

151-
// OverrideCancun (TODO: remove after the fork)
152-
OverrideCancun *uint64 `toml:",omitempty"`
151+
// OverridePrague (TODO: remove after the fork)
152+
OverridePrague *uint64 `toml:",omitempty"`
153153

154154
// OverrideVerkle (TODO: remove after the fork)
155155
OverrideVerkle *uint64 `toml:",omitempty"`

eth/ethconfig/gen_config.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)