Skip to content

Commit

Permalink
doc: document allKeys
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco de Borja Aranda Castillejo <borja@zetachain.com>
  • Loading branch information
Francisco de Borja Aranda Castillejo committed Jul 23, 2024
1 parent 66c665b commit cd0b54c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,8 @@ func NewEthermintApp(

// Set authority to x/gov module account to only expect the module account to update params
evmSs := app.GetSubspace(evmtypes.ModuleName)

// allKeys contain all the application stores, so it covers all the stateful precompiled contract use cases.
allKeys := make(map[string]storetypes.StoreKey, len(keys)+len(tkeys)+len(memKeys))
for k, v := range keys {
allKeys[k] = v
Expand All @@ -471,6 +473,7 @@ func NewEthermintApp(
for k, v := range memKeys {
allKeys[k] = v
}

Check warning

Code scanning / CodeQL

Iteration over map Warning

Iteration over map may be a possible source of non-determinism

app.EvmKeeper = evmkeeper.NewKeeper(
appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], authtypes.NewModuleAddress(govtypes.ModuleName),
app.AccountKeeper, app.BankKeeper, app.StakingKeeper, app.FeeMarketKeeper,
Expand Down

0 comments on commit cd0b54c

Please sign in to comment.