lbcd/sqlite3
Dave Collins 25684a2ccb Don't add a genesis block by default.
This commit modifies the way initial database creation is handled.

Previously, the genesis for the main chain was inserted automatically upon
creation of the database.  However, that approach caused an issue since
other networks such as the test network don't use the same genesis block
as the main network.

The new approach introduced by this commit is to leave it up to the caller
to insert the desired genesis block.  In order to support this, the
InsertBlock function has been modified to allow the first (and only the
first) block to be inserted without having an existing parent.  Also, the
NewestSha function has been modified to return a zero hash, -1 for the
height, and no error when the database does not yet have any blocks.  This
allows the caller to determine the difference between no blocks and only
the genesis block (in which case the return values would be the genesis
hash and 0 for the height).
2013-07-29 11:48:10 -05:00
..
testdata Initial implementation. 2013-05-29 10:09:26 -05:00
doc.go Initial implementation. 2013-05-29 10:09:26 -05:00
insertremove_test.go Don't add a genesis block by default. 2013-07-29 11:48:10 -05:00
internal_test.go Initial implementation. 2013-05-29 10:09:26 -05:00
operational_test.go Don't add a genesis block by default. 2013-07-29 11:48:10 -05:00
sqlite.go Don't add a genesis block by default. 2013-07-29 11:48:10 -05:00
sqliteblock.go Don't add a genesis block by default. 2013-07-29 11:48:10 -05:00
sqlitedbcache.go Exunge debug code. 2013-07-18 18:19:57 -04:00
sqlitetx.go Implement TxOut Spend tracking. 2013-07-18 18:11:37 -04:00