From 9d40d522ab7d63cb354006a77d376904f3990f88 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 9 Jun 2025 16:16:03 +0200 Subject: [PATCH] consensus/misc/eip4844: update test --- consensus/misc/eip4844/eip4844_test.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/consensus/misc/eip4844/eip4844_test.go b/consensus/misc/eip4844/eip4844_test.go index 111eac5b97..81e4c7b7ff 100644 --- a/consensus/misc/eip4844/eip4844_test.go +++ b/consensus/misc/eip4844/eip4844_test.go @@ -137,17 +137,11 @@ func TestCalcExcessBlobGasEIP7918(t *testing.T) { cfg.BlobScheduleConfig.Osaka = &pragueSchedule var ( - targetBlobs = targetBlobsPerBlock(cfg, *cfg.CancunTime) - blobGasPerBlob = uint64(params.BlobTxBlobGasPerBlob) - blobGasTarget = uint64(targetBlobs) * blobGasPerBlob + targetBlobs = targetBlobsPerBlock(cfg, *cfg.CancunTime) + blobGasTarget = uint64(targetBlobs) * params.BlobTxBlobGasPerBlob ) - - makeHeader := func( - parentExcess uint64, - parentBaseFee uint64, - blobsUsed int, - ) *types.Header { - blobGasUsed := uint64(blobsUsed) * blobGasPerBlob + makeHeader := func(parentExcess, parentBaseFee uint64, blobsUsed int) *types.Header { + blobGasUsed := uint64(blobsUsed) * params.BlobTxBlobGasPerBlob return &types.Header{ BaseFee: big.NewInt(int64(parentBaseFee)), ExcessBlobGas: &parentExcess, @@ -171,7 +165,6 @@ func TestCalcExcessBlobGasEIP7918(t *testing.T) { wantExcessGas: 0, }, } - for _, tc := range tests { got := CalcExcessBlobGas(cfg, tc.header, *cfg.CancunTime) if got != tc.wantExcessGas {