This information is available via roundabout methods*, but not directly.
- gettxoutsetinfo or getblockcount->getblockhash
This information is available via roundabout methods*, but not directly.
If roundabout methods are good enough for getting the full data for a block (all the transactions), why not this too?
At the very least, it would seem to me to make better sense as an interface, to use getblockhash with negative indexes (eg, -1 = last block).
@luke-jr That is actually another todo item. Getting an entire, raw block is difficult, potentially impossible without -txindex. This is frustrating, because the data is certainly available to bitcoind.
I've been planning a 'getrawblock <hash>' RPC pull request for this reason.
...due to the txindex issue previously mentioned. But it need not be that way.
Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/091aa8dae9b7345a1cd81e2733766463dfbf4b82 for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.
ACK. Compiled and run on the Mac, tested with half-downloaded testnet chain and with a new, zero-connections, zero-blocks bitcoind.