Skip to content

Commit

Permalink
Make sure it is optimism
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuan-chen committed Oct 29, 2024
1 parent 849a19c commit 345f847
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consensus/misc/eip1559.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func CalcBaseFee(config *chain.Config, parent *types.Header, time uint64) *big.I

elasticity := config.ElasticityMultiplier(params.ElasticityMultiplier)
denominator := getBaseFeeChangeDenominator(config, parent.Number.Uint64(), time)
if config.IsHolocene(parent.Time) {
if config.IsOptimism() && config.IsHolocene(parent.Time) {
denominator, elasticity = DecodeHoloceneExtraData(parent.Extra)
if denominator == 0 {
// this shouldn't happen as the ExtraData should have been validated prior
Expand Down
2 changes: 1 addition & 1 deletion eth/stagedsync/stage_mining_create_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func SpawnMiningCreateBlockStage(s *StageState, tx kv.RwTx, cfg MiningCreateBloc
stateReader := state.NewPlainStateReader(tx)
ibs := state.New(stateReader)

if cfg.chainConfig.IsHolocene(header.Time) {
if cfg.chainConfig.IsOptimism() && cfg.chainConfig.IsHolocene(header.Time) {
if cfg.blockBuilderParameters.EIP1559Params == nil {
return fmt.Errorf("expected eip1559 params, got none")
}
Expand Down

0 comments on commit 345f847

Please sign in to comment.