bugfix, wrong hash stored in blockDb

This commit is contained in:
Bas van Kervel 2015-04-23 17:35:05 +02:00
parent c9e22976f5
commit 5cfa0e9187
1 changed files with 1 additions and 1 deletions

View File

@ -343,7 +343,7 @@ func (self *ChainManager) Export(w io.Writer) error {
func (bc *ChainManager) insert(block *types.Block) {
key := append(blockNumPre, block.Number().Bytes()...)
bc.blockDb.Put(key, bc.lastBlockHash.Bytes())
bc.blockDb.Put(key, block.Hash().Bytes())
// Push block to cache
bc.cache.Push(block)