Skip to content

Commit f5b8420

Browse files
committed
use latest instead of pending
1 parent 2d9afa1 commit f5b8420

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rollup/internal/controller/sender/sender.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ func (s *Sender) getSenderMeta() *orm.SenderMeta {
663663
}
664664

665665
func (s *Sender) getBlockNumberAndBaseFeeAndBlobFee(ctx context.Context) (uint64, uint64, uint64, error) {
666-
header, err := s.client.HeaderByNumber(ctx, big.NewInt(rpc.PendingBlockNumber.Int64()))
666+
header, err := s.client.HeaderByNumber(ctx, big.NewInt(rpc.LatestBlockNumber.Int64()))
667667
if err != nil {
668668
return 0, 0, 0, fmt.Errorf("failed to get header by number, err: %w", err)
669669
}
@@ -677,8 +677,8 @@ func (s *Sender) getBlockNumberAndBaseFeeAndBlobFee(ctx context.Context) (uint64
677677
if excess := header.ExcessBlobGas; excess != nil {
678678
blobBaseFee = misc.CalcBlobFee(*excess).Uint64()
679679
}
680-
// header.Number.Uint64() returns the pendingBlockNumber, so we minus 1 to get the latestBlockNumber.
681-
return header.Number.Uint64() - 1, baseFee, blobBaseFee, nil
680+
681+
return header.Number.Uint64(), baseFee, blobBaseFee, nil
682682
}
683683

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

0 commit comments

Comments
 (0)