consensus/misc/eip4844: address piconit

This commit is contained in:
lightclient 2025-02-04 13:25:23 -07:00
parent 0b3e4b9062
commit a30d0f36b3
No known key found for this signature in database
GPG key ID: 657913021EF45A6A

View file

@ -57,12 +57,15 @@ func TestCalcExcessBlobGas(t *testing.T) {
} }
for i, tt := range tests { for i, tt := range tests {
blobGasUsed := uint64(tt.blobs) * params.BlobTxBlobGasPerBlob blobGasUsed := uint64(tt.blobs) * params.BlobTxBlobGasPerBlob
header := &types.Header{ head := &types.Header{
Time: *config.CancunTime,
}
parent := &types.Header{
Time: *config.CancunTime, Time: *config.CancunTime,
ExcessBlobGas: &tt.excess, ExcessBlobGas: &tt.excess,
BlobGasUsed: &blobGasUsed, BlobGasUsed: &blobGasUsed,
} }
result := CalcExcessBlobGas(config, header, header) result := CalcExcessBlobGas(config, parent, head)
if result != tt.want { if result != tt.want {
t.Errorf("test %d: excess blob gas mismatch: have %v, want %v", i, result, tt.want) t.Errorf("test %d: excess blob gas mismatch: have %v, want %v", i, result, tt.want)
} }