lbcd/memdb
Dave Collins d6c2492c7f Add FetchBlockHeightBySha/FetchBlockHeaderBySha.
This commit introduces two new functions to the btcdb.Db interface named
FetchBlockHeightBySha and FetchBlockHeaderBySha.

The FetchBlockHeightBySha function is useful since previously it was only
possible to get the height of block by fetching the entire block with
FetchBlockBySha and pulling the height out of the returned btcutil.Block.

The FetchBlockHeaderBySha function will ultimately make it much more
efficient to fetch block headers.  Currently, due to the database design
in the ldb backend, the entire block has to be loaded anyways, so the only
current benefit is to avoid the deserialize on all of the transactions.
However, ultimately btcdb will gain a more efficient backend which can
also avoid reading all of the extra transaction data altogether.
2014-01-19 02:54:47 -06:00
..
doc.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
driver.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
memdb.go Add FetchBlockHeightBySha/FetchBlockHeaderBySha. 2014-01-19 02:54:47 -06:00
memdb_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00