From fd8c1e5253d95628eff9d88d9435ec10d498a23e Mon Sep 17 00:00:00 2001 From: Mike Xu Date: Wed, 29 Aug 2018 13:22:39 +0800 Subject: [PATCH] Merge PR #2159: fix the gov/slash error --- PENDING.md | 1 + x/gov/tally.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/PENDING.md b/PENDING.md index dd18be3c0..f45541ccd 100644 --- a/PENDING.md +++ b/PENDING.md @@ -86,5 +86,6 @@ BUG FIXES * \#2105 Fix DB Iterator leak, which may leak a go routine. * [ledger] \#2064 Fix inability to sign and send transactions via the LCD by loading a Ledger device at runtime. + * \#2158 Fix non-deterministic ordering of validator iteration when slashing in `gov EndBlocker` * Tendermint diff --git a/x/gov/tally.go b/x/gov/tally.go index cfb113ae3..b6c9ee2a1 100644 --- a/x/gov/tally.go +++ b/x/gov/tally.go @@ -103,5 +103,8 @@ func tally(ctx sdk.Context, keeper Keeper, proposal Proposal) (passes bool, tall return true, tallyResults, nonVoting } // If more than 1/2 of non-abstaining voters vote No, proposal fails + + SortAddresses(nonVoting) + return false, tallyResults, nonVoting }