getBlockByNum

getBlockByNum

Returns information about a block given its local resource number.

Parameters

  1. block Number: (numeric, required) the local resource number of the block, resource number doesn’t reach consensus on the network, it is generated by each node when accepting a new block.
  2. verbose: (boolean, optional, default=false) reference getBlock.
  3. inclTx: (boolean, optional, default=true) reference getBlock.
  4. fullTx: (boolean, optional, default=true) reference getBlock.

Returns

reference getBlock

Example

Request
 curl --data '{"method":"getBlockByNum","params":[2, true, true, false],"jsonrpc":"2.0","id":1}' -s -k -u "rpcuser:rpcpass"  -H 'Content-Type: application/json' http://127.0.0.1:18131 |jq .
Response

reference getBlock

Contribute on GitHub

Report an Issue | View File | Edit File

© Copyright Qitmeer 2021.
This work is licensed under a Creative Commons Attribution 4.0 International License Creative Commons License