-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(proto): use slices instead of maps
hashmap might be a cause of inconsistent AppHash Signed-off-by: Artur Troian <[email protected]>
- Loading branch information
Showing
7 changed files
with
382 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package v1beta3 | ||
|
||
import ( | ||
"sort" | ||
) | ||
|
||
type DenomTakeRates []DenomTakeRate | ||
|
||
var _ sort.Interface = (*DenomTakeRates)(nil) | ||
|
||
func (u DenomTakeRates) Len() int { | ||
return len(u) | ||
} | ||
|
||
func (u DenomTakeRates) Swap(i, j int) { | ||
u[i], u[j] = u[j], u[i] | ||
} | ||
|
||
func (u DenomTakeRates) Less(i, j int) bool { | ||
return u[i].Denom < u[j].Denom | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.