lbcd/ldb
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
..
dbtest Update ldb/dbtest to latest goleveldb API. 2014-01-18 21:06:10 -06:00
block.go Add FetchBlockHeightBySha/FetchBlockHeaderBySha. 2014-01-19 02:54:47 -06:00
boundary_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
dbcache.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
doc.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
dup_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
insertremove_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
internal_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
leveldb.go catch up to new goleveldb 2014-01-09 13:11:37 -06:00
operational_test.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00
tx.go Add 2014 to copyright dates. 2014-01-08 23:54:52 -06:00