mirror of https://github.com/status-im/nim-eth.git
Add `systemLogsRoot`
This commit is contained in:
parent
00c91a1dca
commit
f5017bd2a2
|
@ -39,6 +39,7 @@ type
|
|||
excessBlobGas*: Opt[uint64] # EIP-4844
|
||||
parentBeaconBlockRoot*: Opt[Hash32] # EIP-4788
|
||||
requestsRoot*: Opt[Hash32] # EIP-7685
|
||||
systemLogsRoot*: Opt[Hash32] # Fusaka-Light
|
||||
|
||||
# starting from EIP-4399, `mixDigest` field is called `prevRandao`
|
||||
template prevRandao*(h: Header): Bytes32 =
|
||||
|
|
|
@ -224,9 +224,14 @@ macro genOptionalFieldsValidation(obj: untyped, T: type, num: static[int]): unty
|
|||
doAssert(obj.withdrawalsRoot.isNone, "withdrawalsRoot needs fee")
|
||||
doAssert(obj.blobGasUsed.isNone, "blobGasUsed needs fee")
|
||||
doAssert(obj.excessBlobGas.isNone, "excessBlobGas needs fee")
|
||||
doAssert(obj.systemLogsRoot.isNone, "systemLogsRoot needs fee")
|
||||
if obj.withdrawalsRoot.isNone:
|
||||
doAssert(obj.blobGasUsed.isNone, "blobGasUsed needs withdrawalsRoot")
|
||||
doAssert(obj.excessBlobGas.isNone, "excessBlobGas needs withdrawalsRoot")
|
||||
doAssert(
|
||||
obj.systemLogsRoot.isNone, "systemLogsRoot needs withdrawalsRoot")
|
||||
if obj.blobGasUsed.isNone:
|
||||
doAssert(obj.systemLogsRoot.isNone, "systemLogsRoot needs blobGasUsed")
|
||||
doAssert obj.blobGasUsed.isSome == obj.excessBlobGas.isSome,
|
||||
"blobGasUsed and excessBlobGas must both be present or absent"
|
||||
|
||||
|
|
Loading…
Reference in New Issue