Portal
Search…
eth_getBlockUncleCount
Returns the number of uncles in a block with given hash
1
web3.eth.getBlockUncleCount(blockHashOrBlockNumber [, callback])
Copied!

Parameters

    1.
    The block number or hash. Or the string "earliest", "latest" or "pending" as in the default block parameter.
    2.
    (optional) Optional callback, returns an error object as first parameter and the result as second.

Returns

The number of transactions in the given block.

Example

1
> web3.eth.getBlockUncleCount(43458).then(console.log)
2
> 0
Copied!
Last modified 9mo ago
Copy link