Skip to content

Commit d02b0c6

Browse files
authored
Fix eth_blobBaseFee JSON RPC method (#3934)
1 parent 5ecd65b commit d02b0c6

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

execution_chain/rpc/server_api.nim

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,12 +628,10 @@ proc setupServerAPI*(api: ServerAPIRef, server: RpcServer, am: ref AccountsManag
628628
## Returns the base fee per blob gas in wei.
629629
let header = api.headerFromTag(blockId("latest")).valueOr:
630630
raise newException(ValueError, "Block not found")
631-
if header.blobGasUsed.isNone:
632-
raise newException(ValueError, "blobGasUsed missing from latest header")
633631
if header.excessBlobGas.isNone:
634632
raise newException(ValueError, "excessBlobGas missing from latest header")
635633
let blobBaseFee =
636-
getBlobBaseFee(header.excessBlobGas.get, api.com, api.com.toEVMFork(header)) * header.blobGasUsed.get.u256
634+
getBlobBaseFee(header.excessBlobGas.get, api.com, api.com.toEVMFork(header))
637635
if blobBaseFee > high(uint64).u256:
638636
raise newException(ValueError, "blobBaseFee is bigger than uint64.max")
639637
return w3Qty blobBaseFee.truncate(uint64)

0 commit comments

Comments
 (0)