Skip to content

Commit

Permalink
core:remove redundant func (#1159)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinglin89 authored Oct 31, 2022
1 parent caf9d0a commit bed1a57
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions core/block_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ func (v *BlockValidator) ValidateBody(block *types.Block) error {
}

validateFuns := []func() error{
func() error {
if v.bc.HasBlockAndState(block.Hash(), block.NumberU64()) {
return ErrKnownBlock
}
return nil
},
func() error {
if hash := types.DeriveSha(block.Transactions(), trie.NewStackTrie(nil)); hash != header.TxHash {
return fmt.Errorf("transaction root hash mismatch: have %x, want %x", hash, header.TxHash)
Expand Down

0 comments on commit bed1a57

Please sign in to comment.