cfx_getBlocksByEpoch - Conflux

Returns the block hashes in the specified epoch.

Parameters

  • QUANTITY|TAG - The epoch number, or the string "latest_mined", "latest_state", "latest_confirmed", "latest_checkpoint" or "earliest", see the epoch number parameter.

Returns

Array - Array of block hashes, sorted by their execution (topological) order. Note that the last one is the pivot hash.


Example

Request

curl -X POST \
--data '{"jsonrpc":"2.0","method":"cfx_getBlocksByEpoch","params":["0x11"],"id":1}' \
-H "Content-Type: application/json" \
https://cfx-core.unifra.io/v1/ad2eb3c7a9404cc6a35a6641eaf70577 


Result

{
    "jsonrpc": "2.0",
    "result": [
        "0xcf53fe0ceb2f4807c404c6dbbea3dc17dd8e9c08f7c3a21daad55dfa10bf3e07"
    ],
    "id": 0
}
Language
URL
Click Try It! to start a request and see the response here!