blockchain: Initialize database with genesis block.

This fixes a bug introduced by #1066.
This commit is contained in:
Jim Posen 2018-02-09 08:34:30 -08:00 committed by Josh Rickmar
parent 50de9da05b
commit 0ef0d8c59b

View file

@ -1125,6 +1125,12 @@ func (b *BlockChain) createChainState() error {
return err
}
// Save the genesis block to the block index database.
err = dbStoreBlockNode(dbTx, node)
if err != nil {
return err
}
// Add the genesis block hash to height and height to hash
// mappings to the index.
err = dbPutBlockIndex(dbTx, &node.hash, node.height)