mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-02-02 23:35:31 +00:00
eth_getBlockTransactionCountByNumber
This commit is contained in:
parent
1871a7b090
commit
b9906fb263
@ -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.
|
## 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.
|
## 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):
|
rpcsrv.rpc("eth_getUncleCountByBlockHash") do(data: HexDataStr):
|
||||||
## Returns the number of uncles in a block from a block matching the given block hash.
|
## Returns the number of uncles in a block from a block matching the given block hash.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user