eth_getBlockTransactionCountByNumber

This commit is contained in:
coffeepots 2018-08-14 16:54:59 +01:00
parent 1871a7b090
commit b9906fb263
1 changed files with 4 additions and 1 deletions

View File

@ -133,7 +133,10 @@ proc setupP2PRPC*(node: EthereumNode, rpcsrv: RpcServer) =
##
## data: integer of a block number, or the string "earliest", "latest" or "pending", as in the default block parameter.
## Returns integer of the number of transactions in this block.
discard
let
header = chain.headerFromTag(quantityTag)
body = chain.getBlockBody(header.stateRoot)
result = body.transactions.len
rpcsrv.rpc("eth_getUncleCountByBlockHash") do(data: HexDataStr):
## Returns the number of uncles in a block from a block matching the given block hash.