From 2b5f2a27e303b13127bb525b0c7a309eaa7fbed9 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Wed, 14 Dec 2022 00:25:27 +0100 Subject: [PATCH] fix `excessDataGas` type (`GasInt` --> `UInt256`) (#571) Used incorrect type in original PR. Fixing. --- eth/common/eth_types.nim | 2 +- eth/common/eth_types_rlp.nim | 2 +- tests/rlp/test_common.nim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eth/common/eth_types.nim b/eth/common/eth_types.nim index a9b72d1..d10c081 100644 --- a/eth/common/eth_types.nim +++ b/eth/common/eth_types.nim @@ -121,7 +121,7 @@ type # `baseFee` is the get/set of `fee` fee*: Option[UInt256] # EIP-1559 withdrawalsRoot*: Option[Hash256] # EIP-4895 - excessDataGas*: Option[GasInt] # EIP-4844 + excessDataGas*: Option[UInt256] # EIP-4844 BlockBody* = object transactions*: seq[Transaction] diff --git a/eth/common/eth_types_rlp.nim b/eth/common/eth_types_rlp.nim index 4746196..e34da6e 100644 --- a/eth/common/eth_types_rlp.nim +++ b/eth/common/eth_types_rlp.nim @@ -350,7 +350,7 @@ proc read*(rlp: var Rlp, T: type BlockHeader): T = result.withdrawalsRoot = some rlp.read(Hash256) if len >= 18: # EIP-4844 - result.excessDataGas = some rlp.read(GasInt) + result.excessDataGas = some rlp.read(UInt256) proc rlpHash*[T](v: T): Hash256 = keccakHash(rlp.encode(v)) diff --git a/tests/rlp/test_common.nim b/tests/rlp/test_common.nim index 2c0179a..7e27459 100644 --- a/tests/rlp/test_common.nim +++ b/tests/rlp/test_common.nim @@ -116,7 +116,7 @@ proc suite2() = doTest h # EIP-4844 - h.excessDataGas = some GasInt(1337) + h.excessDataGas = some 1234.u256 doTest h suite1()