Skip to content

Commit

Permalink
fix(rollup): get latest block number
Browse files Browse the repository at this point in the history
  • Loading branch information
yiweichi committed Oct 25, 2024
1 parent 21ecaa6 commit f1425e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rollup/internal/controller/sender/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ func (s *Sender) getBlockNumberAndBaseFeeAndBlobFee(ctx context.Context) (uint64
parentExcessBlobGas := eip4844.CalcExcessBlobGas(*header.ExcessBlobGas, *header.BlobGasUsed)
blobBaseFee = eip4844.CalcBlobFee(parentExcessBlobGas).Uint64()
}
return header.Number.Uint64(), baseFee, blobBaseFee, nil
// header.Number.Uint64() returns the pendingBlockNumber, so we minus 1 to get the latestBlockNumber.
return header.Number.Uint64()-1, baseFee, blobBaseFee, nil
}

func makeSidecar(blob *kzg4844.Blob) (*gethTypes.BlobTxSidecar, error) {
Expand Down

0 comments on commit f1425e8

Please sign in to comment.