cosmos-sdk/store/internal/proofs
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
..
convert.go tendermint: update to rc3 (#6892) 2020-08-14 13:58:53 -04:00
convert_test.go tendermint: update to rc3 (#6892) 2020-08-14 13:58:53 -04:00
create.go feat: ADR-040: ICS-23 proofs for SMT store (#10015) 2022-02-22 12:22:06 +00:00
create_test.go feat: Add ics23 proof tools: `ics23-{iavl,tendermint,smt}` (#10802) 2022-02-22 11:39:08 +00:00
helpers.go chore: all: use golang.org/x/exp/maps.(Keys, Values) where necessary (#13349) 2022-09-21 02:08:13 +00:00