Skip to content

Commit

Permalink
Merge pull request cosmos#307 from ovrclk/aditya/correct-proposet
Browse files Browse the repository at this point in the history
Sort TrustedVals
  • Loading branch information
cwgoes authored Oct 21, 2020
2 parents 479c677 + 4471926 commit be7f278
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions relayer/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/hex"
"errors"
"fmt"
"sort"
"strings"
"time"

Expand Down Expand Up @@ -347,6 +348,8 @@ func (c *Chain) QueryValsetAtHeight(height clienttypes.Height) (*tmproto.Validat

// create tendermint ValidatorSet from SDK Validators
tmVals := stakingtypes.Validators(res.Hist.Valset).ToTmValidators()
// TODO: Add sorting logic to historical info
sort.Sort(tmtypes.ValidatorsByVotingPower(tmVals))
tmValSet := &tmtypes.ValidatorSet{
Validators: tmVals,
}
Expand Down

0 comments on commit be7f278

Please sign in to comment.