diff --git a/blockchain/chainio.go b/blockchain/chainio.go index 44558494..3b0e2584 100644 --- a/blockchain/chainio.go +++ b/blockchain/chainio.go @@ -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)