mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-30 14:41:20 +00:00
consensus: check both vote orderings for dupeout txs
This commit is contained in:
parent
33f8943543
commit
f55609a792
@ -390,6 +390,8 @@ func (s *State) ExecTx(tx_ blk.Tx) error {
|
|||||||
if tx.VoteA.Type == blk.VoteTypeCommit && tx.VoteA.Round < tx.VoteB.Round {
|
if tx.VoteA.Type == blk.VoteTypeCommit && tx.VoteA.Round < tx.VoteB.Round {
|
||||||
// Check special case (not an error, validator must be slashed!)
|
// Check special case (not an error, validator must be slashed!)
|
||||||
// Validators should not sign another vote after committing.
|
// 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 {
|
} else {
|
||||||
if tx.VoteA.Round != tx.VoteB.Round {
|
if tx.VoteA.Round != tx.VoteB.Round {
|
||||||
return errors.New("DupeoutTx rounds don't match")
|
return errors.New("DupeoutTx rounds don't match")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user