Skip to content

Commit

Permalink
check header.LastCommitHash (ethereum#53)
Browse files Browse the repository at this point in the history
Co-authored-by: blockchaindevsh <blockchaindevsh@google.com>
  • Loading branch information
blockchaindevsh and blockchaindevsh authored Mar 18, 2022
1 parent 74f9497 commit 3c4a43c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions consensus/tendermint/adapter/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ func (s *Store) ValidateBlock(state pbft.ChainState, block *types.FullBlock) (er
state.ChainID, state.LastBlockID, block.NumberU64()-1, block.LastCommit); err != nil {
return err
}
if block.Block.Header().LastCommitHash != block.LastCommit.Hash() {
return errors.New("header.LastCommitHash != LastCommit.Hash()")
}
}

// Validate block Time with LastCommit
Expand Down

0 comments on commit 3c4a43c

Please sign in to comment.