mirror of https://github.com/status-im/nim-eth.git
fix `excessDataGas` type (`GasInt` --> `UInt256`) (#571)
Used incorrect type in original PR. Fixing.
This commit is contained in:
parent
c9fcab8052
commit
2b5f2a27e3
|
@ -121,7 +121,7 @@ type
|
||||||
# `baseFee` is the get/set of `fee`
|
# `baseFee` is the get/set of `fee`
|
||||||
fee*: Option[UInt256] # EIP-1559
|
fee*: Option[UInt256] # EIP-1559
|
||||||
withdrawalsRoot*: Option[Hash256] # EIP-4895
|
withdrawalsRoot*: Option[Hash256] # EIP-4895
|
||||||
excessDataGas*: Option[GasInt] # EIP-4844
|
excessDataGas*: Option[UInt256] # EIP-4844
|
||||||
|
|
||||||
BlockBody* = object
|
BlockBody* = object
|
||||||
transactions*: seq[Transaction]
|
transactions*: seq[Transaction]
|
||||||
|
|
|
@ -350,7 +350,7 @@ proc read*(rlp: var Rlp, T: type BlockHeader): T =
|
||||||
result.withdrawalsRoot = some rlp.read(Hash256)
|
result.withdrawalsRoot = some rlp.read(Hash256)
|
||||||
if len >= 18:
|
if len >= 18:
|
||||||
# EIP-4844
|
# EIP-4844
|
||||||
result.excessDataGas = some rlp.read(GasInt)
|
result.excessDataGas = some rlp.read(UInt256)
|
||||||
|
|
||||||
proc rlpHash*[T](v: T): Hash256 =
|
proc rlpHash*[T](v: T): Hash256 =
|
||||||
keccakHash(rlp.encode(v))
|
keccakHash(rlp.encode(v))
|
||||||
|
|
|
@ -116,7 +116,7 @@ proc suite2() =
|
||||||
doTest h
|
doTest h
|
||||||
|
|
||||||
# EIP-4844
|
# EIP-4844
|
||||||
h.excessDataGas = some GasInt(1337)
|
h.excessDataGas = some 1234.u256
|
||||||
doTest h
|
doTest h
|
||||||
|
|
||||||
suite1()
|
suite1()
|
||||||
|
|
Loading…
Reference in New Issue