Skip to content

Commit

Permalink
remove has state checck
Browse files Browse the repository at this point in the history
  • Loading branch information
unclezoro committed Jun 3, 2021
1 parent 3e3c0d8 commit f1d7fb8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,8 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error {

validateFuns := []func() error{
func() error {
if !v.bc.HasBlockAndState(block.ParentHash(), block.NumberU64()-1) {
if !v.bc.HasBlock(block.ParentHash(), block.NumberU64()-1) {
return consensus.ErrUnknownAncestor
}
return consensus.ErrPrunedAncestor
if !v.bc.HasBlock(block.ParentHash(), block.NumberU64()-1) {
return consensus.ErrUnknownAncestor
}
return nil
},
Expand Down

0 comments on commit f1d7fb8

Please sign in to comment.