diff --git a/fluffy/rpc/rpc_eth_api.nim b/fluffy/rpc/rpc_eth_api.nim index 9795a218a2..26cd4f1376 100644 --- a/fluffy/rpc/rpc_eth_api.nim +++ b/fluffy/rpc/rpc_eth_api.nim @@ -1,4 +1,4 @@ -# Nimbus +# Fluffy # Copyright (c) 2021-2023 Status Research & Development GmbH # Licensed and distributed under either of # * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT). @@ -215,7 +215,7 @@ proc installEthApiHandlers*( (header, body) = (await historyNetwork.getBlock(blockHash)).valueOr: return none(BlockObject) - return some(BlockObject.init(header, body)) + return some(BlockObject.init(header, body, fullTransactions)) rpcServerWithProxy.rpc("eth_getBlockByNumber") do( quantityTag: string, fullTransactions: bool) -> Option[BlockObject]: @@ -240,7 +240,7 @@ proc installEthApiHandlers*( (header, body) = (await historyNetwork.getBlock(blockHash)).valueOr: return none(BlockObject) - return some(BlockObject.init(header, body)) + return some(BlockObject.init(header, body, fullTransactions)) else: raise newException( ValueError, "Not available before Capella - not synced?") @@ -255,7 +255,7 @@ proc installEthApiHandlers*( (header, body) = (await historyNetwork.getBlock(blockHash)).valueOr: return none(BlockObject) - return some(BlockObject.init(header, body)) + return some(BlockObject.init(header, body, fullTransactions)) else: raise newException( ValueError, "Not available before Capella - not synced?") @@ -274,7 +274,7 @@ proc installEthApiHandlers*( return none(BlockObject) else: let (header, body) = maybeBlock.get() - return some(BlockObject.init(header, body)) + return some(BlockObject.init(header, body, fullTransactions)) rpcServerWithProxy.rpc("eth_getBlockTransactionCountByHash") do( data: rpc_types.Hash256) -> Quantity: diff --git a/fluffy/scripts/test_portal_testnet.nim b/fluffy/scripts/test_portal_testnet.nim index 044925c734..88d4fd3fda 100644 --- a/fluffy/scripts/test_portal_testnet.nim +++ b/fluffy/scripts/test_portal_testnet.nim @@ -270,7 +270,7 @@ procSuite "Portal testnet tests": let content = await retryUntil( proc (): Future[Option[BlockObject]] {.async.} = try: - let res = await client.eth_getBlockByHash(w3Hash hash, false) + let res = await client.eth_getBlockByHash(w3Hash hash, true) await client.close() return res except CatchableError as exc: @@ -406,7 +406,7 @@ procSuite "Portal testnet tests": # let content = await retryUntil( # proc (): Future[Option[BlockObject]] {.async.} = # try: - # let res = await client.eth_getBlockByHash(hash.ethHashStr(), false) + # let res = await client.eth_getBlockByHash(hash.ethHashStr(), true) # await client.close() # return res # except CatchableError as exc: @@ -492,7 +492,7 @@ procSuite "Portal testnet tests": # let content = await retryUntil( # proc (): Future[Option[BlockObject]] {.async.} = # try: - # let res = await client.eth_getBlockByHash(hash.ethHashStr(), false) + # let res = await client.eth_getBlockByHash(hash.ethHashStr(), true) # await client.close() # return res # except CatchableError as exc: