Skip to content

Commit

Permalink
further cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
g11tech committed Jul 28, 2023
1 parent a15df5d commit dfe2822
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/block/src/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,12 @@ export class BlockHeader {
* Returns the price per unit of blob gas for a blob transaction in the current/pending block
* @returns the price in gwei per unit of blob gas spent
*/
getblobGasPrice(): bigint {
getBlobGasPrice(): bigint {
if (this.excessBlobGas === undefined) {
throw new Error('header must have excessBlobGas field populated')
}
return fakeExponential(
this.common.param('gasPrices', 'minblobGasPrice'),
this.common.param('gasPrices', 'minBlobGasPrice'),
this.excessBlobGas,
this.common.param('gasConfig', 'blobGasPriceUpdateFraction')
)
Expand Down
2 changes: 1 addition & 1 deletion packages/block/test/eip4844block.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe('blob gas tests', () => {
{ common, skipConsensusFormatValidation: true }
)
excessBlobGas = highGasHeader.calcNextExcessBlobGas()
blobGasPrice = highGasHeader.getblobGasPrice()
blobGasPrice = highGasHeader.getBlobGasPrice()
assert.equal(excessBlobGas, 6684672n)
assert.equal(blobGasPrice, 6n, 'computed correct blob gas price')

Expand Down
4 changes: 2 additions & 2 deletions packages/block/test/testdata/payload-slot-87335.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"0x03f897850120b996ed80840bebc200843b9aca078303345094c8d369b164361a8961286cfbab3bc10f962185a88080c08411e1a300e1a0011df88a2971c8a7ac494a7ba37ec1acaa1fc1edeeb38c839b5d1693d47b69b080a032f122f06e5802224db4c8a58fd22c75173a713f63f89936f811c144b9e40129a043a2a872cbfa5727007adf6a48febe5f190d2e4cd5ed6122823fb6ff47ecda32"
],
"withdrawals": [],
"excess_data_gas": "262144",
"data_gas_used": "524288",
"excess_blob_gas": "262144",
"blob_gas_used": "524288",
"parent_beacon_block_root": "0x1344ac29ccbab1c5208e04edf83d897b9679143cda921caf9959d4e7547267ea"
}

0 comments on commit dfe2822

Please sign in to comment.