Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
amsanghi committed Nov 5, 2024
1 parent c4d8abf commit c433473
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,11 @@ func (miner *Miner) prepareWork(genParams *generateParams) (*environment, error)
log.Error("Failed to prepare header for sealing", "err", err)
return nil, err
}
prevArbosVersion := types.DeserializeHeaderExtraInformation(parent).ArbOSFormatVersion
// Apply EIP-4844, EIP-4788.
if miner.chainConfig.IsCancun(header.Number, header.Time, types.DeserializeHeaderExtraInformation(header).ArbOSFormatVersion) {
if miner.chainConfig.IsCancun(header.Number, header.Time, prevArbosVersion) {
var excessBlobGas uint64
if miner.chainConfig.IsCancun(parent.Number, parent.Time, types.DeserializeHeaderExtraInformation(parent).ArbOSFormatVersion) {
if miner.chainConfig.IsCancun(parent.Number, parent.Time, prevArbosVersion) {
excessBlobGas = eip4844.CalcExcessBlobGas(*parent.ExcessBlobGas, *parent.BlobGasUsed)
} else {
// For the first post-fork block, both parent.data_gas_used and parent.excess_data_gas are evaluated as 0
Expand Down

0 comments on commit c433473

Please sign in to comment.