From b7c35f256889eaa7e38c066daf94d91f5a0ab79b Mon Sep 17 00:00:00 2001 From: linghuying <1599935829@qq.com> Date: Fri, 21 Mar 2025 23:36:39 +0800 Subject: [PATCH] refactor(simapp): use maps.Clone to simplify the code (#24077) Signed-off-by: linghuying <1599935829@qq.com> Co-authored-by: Alex | Interchain Labs --- simapp/app.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/simapp/app.go b/simapp/app.go index 34ed0fc6b2..c1c85616ff 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "io" + "maps" "os" "path/filepath" @@ -883,12 +884,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.