eth
eth_getUncleCountByBlockNumber
Returns the number of uncles in a block matching the given block number.
Returns the number of uncles in a block matching the given block number.
Parameters
| # | Type | Description |
|---|---|---|
| 1 | string | Block number as a hexadecimal string, or a block tag ("latest", "earliest", "pending"). |
Returns
string -- The number of uncles in the block as a hexadecimal string, or null if no block is found.
Example
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getUncleCountByBlockNumber",
"params": ["0x1080000"],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0"
}
TRY IT
Notes
- PulseChain uses proof-of-stake consensus, so uncle blocks (also known as ommer blocks) are not produced. This method will typically return
"0x0". - This method exists for Ethereum JSON-RPC compatibility. It was relevant on proof-of-work chains where miners could produce uncle blocks.
- Blocks before ~17,233,100 (0x1071A5C) are inherited from Ethereum's PoW history and may contain uncles.
- The companion method
eth_getUncleCountByBlockHashaccepts a block hash instead of a number.
