core: improved chainDb using sequential keys

This commit is contained in:
zsfelfoldi
2016-04-05 15:22:04 +02:00
parent 5a458da42a
commit f9917c8c7b
24 changed files with 727 additions and 366 deletions

View File

@@ -72,7 +72,7 @@ func (v *BlockValidator) ValidateBlock(block *types.Block) error {
return &KnownBlockError{block.Number(), block.Hash()}
}
}
parent := v.bc.GetBlock(block.ParentHash())
parent := v.bc.GetBlock(block.ParentHash(), block.NumberU64()-1)
if parent == nil {
return ParentError(block.ParentHash())
}