This commit is contained in:
Etan Kissling 2023-08-28 17:55:00 +02:00
parent c6361e5640
commit 362382a213
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 20 additions and 18 deletions

View File

@ -1356,7 +1356,7 @@ type
eip6404Bytes: seq[byte]
proc ETHTransactionsCreateFromJson(
transactionsRoot: ptr Eth2Digest,
transactionsRoot #[optional]#: ptr Eth2Digest,
transactionsJson: cstring): ptr seq[ETHTransaction] {.exported.} =
## Verifies that JSON transactions data is valid and that it matches
## the given `transactionsRoot`.
@ -1659,6 +1659,7 @@ proc ETHTransactionsCreateFromJson(
eip6404Root: eip6404Tx.hash_tree_root(),
eip6404Bytes: eip6404Bytes)
if transactionsRoot != nil:
var tr = initHexaryTrie(newMemoryDB())
for i, transaction in txs:
try:
@ -2152,7 +2153,7 @@ type
eip6466Bytes: seq[byte]
proc ETHReceiptsCreateFromJson(
receiptsRoot: ptr Eth2Digest,
receiptsRoot #[optional]#: ptr Eth2Digest,
receiptsJson: cstring,
transactions: ptr seq[ETHTransaction]): ptr seq[ETHReceipt] {.exported.} =
## Verifies that JSON receipts data is valid and that it matches
@ -2345,6 +2346,7 @@ proc ETHReceiptsCreateFromJson(
bytes: rlpBytes,
eip6466Bytes: eip6466Bytes)
if receiptsRoot != nil:
var tr = initHexaryTrie(newMemoryDB())
for i, rec in recs:
try: