Skip to content

Commit

Permalink
refactor(simapp): using maps.Clone to simplify codes (cosmos#19885)
Browse files Browse the repository at this point in the history
Co-authored-by: weixie.c <[email protected]>
  • Loading branch information
cuiweixie and weixiecui authored Mar 28, 2024
1 parent 6972e00 commit f630cfb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"encoding/json"
"fmt"
"io"
"maps"
"os"
"path/filepath"

Expand Down Expand Up @@ -764,12 +765,7 @@ func (app *SimApp) RegisterNodeService(clientCtx client.Context, cfg config.Conf
//
// NOTE: This is solely to be used for testing purposes.
func GetMaccPerms() map[string][]string {
dupMaccPerms := make(map[string][]string)
for k, v := range maccPerms {
dupMaccPerms[k] = v
}

return dupMaccPerms
return maps.Clone(maccPerms)
}

// BlockedAddresses returns all the app's blocked account addresses.
Expand Down

0 comments on commit f630cfb

Please sign in to comment.