Skip to content

Commit

Permalink
Removed commit validation from message receive function
Browse files Browse the repository at this point in the history
  • Loading branch information
jmalicevic committed Jan 11, 2025
1 parent 236829e commit cfed49b
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,12 +961,7 @@ func (cs *State) handleMsg(mi msgInfo) {
// We could make note of this and help filter in broadcastHasVoteMessage().

case *CommitMessage:
cs.Logger.Info("XX received cmt message")
// TODO Commit has been validated Validate Basic when unmarshalling, but need to validate the the commit itself
err := cs.Validators.VerifyCommit(cs.state.ChainID, cs.state.LastBlockID, cs.Height, msg.Commit)
if err != nil {
panic("failed to validate comit")
}

added, err := cs.AddCommit(msg.Commit, peerID)
if added {
// XXX Add stats about received commit
Expand Down

0 comments on commit cfed49b

Please sign in to comment.