Skip to content

Commit

Permalink
Fix missing parameter passing for fullTransactions in JSON-RPC API
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeme committed Dec 13, 2023
1 parent 5fd5496 commit 6b3f41b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fluffy/rpc/rpc_eth_api.nim
Original file line number Diff line number Diff line change
@@ -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).
Expand Down Expand Up @@ -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]:
Expand All @@ -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?")
Expand All @@ -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?")
Expand All @@ -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:
Expand Down

0 comments on commit 6b3f41b

Please sign in to comment.