From f55609a7921c13632c398a8f4ad767ee87b24c54 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Mon, 16 Mar 2015 17:53:36 -0700 Subject: [PATCH] consensus: check both vote orderings for dupeout txs --- state/state.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/state/state.go b/state/state.go index ceca4632..83fd7b89 100644 --- a/state/state.go +++ b/state/state.go @@ -390,6 +390,8 @@ func (s *State) ExecTx(tx_ blk.Tx) error { if tx.VoteA.Type == blk.VoteTypeCommit && tx.VoteA.Round < tx.VoteB.Round { // Check special case (not an error, validator must be slashed!) // Validators should not sign another vote after committing. + } else if tx.VoteB.Type == blk.VoteTypeCommit && tx.VoteB.Round < tx.VoteA.Round { + // We need to check both orderings of the votes } else { if tx.VoteA.Round != tx.VoteB.Round { return errors.New("DupeoutTx rounds don't match")