# Gavin Andresen # 2011-12-24 03:09:31 # https://bitcointalk.org/index.php?topic=55536.msg660804#msg660804 @s{(link)} : @p{par} 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. @p{par} @p{(bf}getblockhash @p{lt}index@s{gt} @p{brk} Returns hash of block in best-block-chain at @p{lt}index@s{gt}. @p{brk} @p{bf)} @p{brk} e.g. getblockhash 0 returns 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f @p{brk} (genesis block hash) @p{par} @p{(bf}getblock @p{lt}hash@s{gt} @p{brk} Returns details of a block with given block-hash. @p{brk} @p{bf)} @p{brk} e.g. ./bitcoind getblock $(./bitcoind getblockhash 0) returns the genesis block: @p{par} Code: { @p{brk} "hash" : "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f", @p{brk} "blockcount" : 0, @p{brk} "version" : 1, @p{brk} "merkleroot" : "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b", @p{brk} "time" : 1231006505, @p{brk} "nonce" : 2083236893, @p{brk} "difficulty" : 1.00000000, @p{brk} "tx" : [ @p{brk} "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b" @p{brk} ], @p{brk} "hashnext" : "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048" @p{brk} } @p{brk}