Title: getblock / getblockhash RPC commands Post by: Gavin Andresen on December 24, 2011, 03:09:31 AM https://github.com/bitcoin/bitcoin/pull/727 :
This is designed to work nicely with 'gettransaction' and new 'blockhash' information returned in listtransactions; it is modified from the 'getblock' that was in my monitorreceived patch. getblockhash <index> Returns hash of block in best-block-chain at <index>. e.g. getblockhash 0 returns 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f (genesis block hash) getblock <hash> Returns details of a block with given block-hash. e.g. ./bitcoind getblock $(./bitcoind getblockhash 0) returns the genesis block: Code: { |