cosmos-sdk/types
Emmanuel T Odeke 9c2aef342d
chore: all: use golang.org/x/exp/maps.(Keys, Values) where necessary (#13349)
Uses golang.org/x/exp/maps.(Keys, Values) to sort out flagged
potential non-determinism issues due to map iteration which is
randomized in maps.

These were flagged by cosmos/gosec in

* https://github.com/cosmos/cosmos-sdk/security/code-scanning/724
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/725
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/726
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/727
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/728
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/729
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/782
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/813
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/814
* https://github.com/cosmos/cosmos-sdk/security/code-scanning/816

which complained about potential non-determinism in
map iteration in which we only want appends in map iteration loops,
this change instead uses golang.org/x/exp/maps.Keys to retrieve
the keys then sort.Strings which simplifies the helper code.

This change fixes issues in:
* orm/model/ormdb: non-determinism in ExportJSON
* store/internal/proofs
* types/module
* x/auth/keeper
* x/bank
* x/genutil/client/cli

Fixes #13348
2022-09-21 02:08:13 +00:00
..
address docs: updates outdated docs (#12014) 2022-05-31 08:59:38 -04:00
bech32 chore: move server.GenerateCoinKey and server.GenerateSaveCoinKey to … (#10957) 2022-01-18 15:24:16 +00:00
errors chore: fix linting issues exposed by fixing golangci-lint (#12895) 2022-08-11 22:00:24 +02:00
grpc Add GRPCBlockHeightHeader in clientCtx gRPC requests (#7021) 2020-08-12 14:42:10 +00:00
kv refactor: migrate to `cosmos/gogoproto` (#13070) 2022-09-08 17:27:48 +00:00
module chore: all: use golang.org/x/exp/maps.(Keys, Values) where necessary (#13349) 2022-09-21 02:08:13 +00:00
msgservice feat: add proto annotation for Msg services (#13178) 2022-09-14 09:27:45 +00:00
query fix: fix buf commit link (#13345) 2022-09-20 21:21:45 +02:00
simulation chore: math lib update and type fixes (#12791) 2022-08-02 11:16:40 +00:00
tx refactor: migrate to `cosmos/gogoproto` (#13070) 2022-09-08 17:27:48 +00:00
abci.go Merge PR #4613: Only change rootmultistore hash when substore hashes change 2019-06-25 13:11:22 -04:00
abci.pb.go refactor: migrate to `cosmos/gogoproto` (#13070) 2022-09-08 17:27:48 +00:00
address.go chore(types): add MustAccAddressFromBech32 util func (#12201) 2022-06-09 12:26:07 -04:00
address_race_test.go refactor!: Rename AccAddressFromHex (#11888) 2022-05-06 22:09:36 +00:00
address_test.go chore: gofumpt (#11839) 2022-05-19 10:55:27 +02:00
bench_test.go chore: gofumpt (#11839) 2022-05-19 10:55:27 +02:00
codec.go Remove ServiceMsgs from ADR-031 (#9139) 2021-04-30 11:00:47 +00:00
coin.go fix: types: correctly coalesce coins even with repeated denominations & simplify logic (#13265) 2022-09-14 13:29:45 +00:00
coin.pb.go refactor: migrate to `cosmos/gogoproto` (#13070) 2022-09-08 17:27:48 +00:00
coin_benchmark_test.go test: fix BenchmarkCoinsAdditionIntersect panic (#9904) 2021-08-11 02:13:17 -07:00
coin_internal_test.go add sorted check for the coins sub/add fun parameter (#9240) 2021-05-05 15:55:28 +00:00
coin_test.go fix: types: correctly coalesce coins even with repeated denominations & simplify logic (#13265) 2022-09-14 13:29:45 +00:00
config.go chore: fix linting issues exposed by fixing golangci-lint (#12895) 2022-08-11 22:00:24 +02:00
config_test.go Deprecate SetFullFundraiserPath in favor of SetPurpose and SetCoinType (#8629) 2021-02-22 15:14:09 +00:00
context.go feat: add mempool interfaces (#13249) 2022-09-13 21:25:44 +02:00
context_test.go refactor: create go.mod for simapp (#13130) 2022-09-07 18:14:22 +00:00
dec_coin.go fix: prevent nil DecCoin creation when converting Coins to DecCoins (#12903) 2022-08-11 21:39:46 +00:00
dec_coin_test.go fix: prevent nil DecCoin creation when converting Coins to DecCoins (#12903) 2022-08-11 21:39:46 +00:00
denom.go refactor!: create math go sub module (#11788) 2022-04-28 14:05:21 -04:00
denom_internal_test.go cli: convert coins to smallest unit registered (#7777) 2020-11-16 11:34:54 +00:00
events.go perf: all: remove unnecessary allocations from strings.Builder.WriteString(fmt.Sprintf(...)) (#13230) 2022-09-09 21:57:46 +00:00
events_test.go chore: bump tendermint version (#13148) 2022-09-05 07:39:12 +00:00
handler.go chore: fix linting issues exposed by fixing golangci-lint (#12895) 2022-08-11 22:00:24 +02:00
handler_test.go refactor: create go.mod for simapp (#13130) 2022-09-07 18:14:22 +00:00
invariant.go Merge PR #4832: print all failed invariants only 2019-08-05 14:21:44 -04:00
invariant_test.go types: tests -> test suites migration (#7405) 2020-09-29 13:29:10 +02:00
math.go refactor: Move sdk.Dec to math package (#12634) 2022-07-20 15:13:45 +00:00
mempool.go feat: add mempool interfaces (#13249) 2022-09-13 21:25:44 +02:00
proto.go refactor: migrate to `cosmos/gogoproto` (#13070) 2022-09-08 17:27:48 +00:00
queryable.go Merge PR #5421: Refactor Error Handling 2019-12-27 12:57:54 -05:00
result.go refactor: migrate to `cosmos/gogoproto` (#13070) 2022-09-08 17:27:48 +00:00
result_test.go chore: bump tendermint version (#13148) 2022-09-05 07:39:12 +00:00
router.go refactor!: Remove sdk.Router and refactor baseapp tests (#13005) 2022-08-30 23:50:47 +02:00
staking.go revert: Revert "feat: staking config (#10988)" (#11446) 2022-03-24 12:26:25 +01:00
staking_test.go revert: Revert "feat: staking config (#10988)" (#11446) 2022-03-24 12:26:25 +01:00
store.go refactor!: abstractions for snapshot and pruning; snapshot intervals eventually pruned; unit tests (#11496) 2022-04-21 15:30:36 -04:00
store_internal_test.go chore: gofumpt (#11839) 2022-05-19 10:55:27 +02:00
store_test.go chore: gofumpt (#11839) 2022-05-19 10:55:27 +02:00
tx_msg.go feat: add mempool interfaces (#13249) 2022-09-13 21:25:44 +02:00
tx_msg_test.go refactor!: change GetSigners return type to []sdk.AccAddress (#9915) 2021-08-13 15:34:00 +00:00
utils.go feat: add `FormatTime` and `ParseTimeString` methods (#12995) 2022-08-22 23:53:09 +02:00
utils_test.go feat: add `FormatTime` and `ParseTimeString` methods (#12995) 2022-08-22 23:53:09 +02:00