diff --git a/tests/go.mod b/tests/go.mod index 7f8e2ecafe..127c4af69b 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -219,7 +219,6 @@ replace ( github.com/Finschia/finschia-sdk/api => ../api // We always want to test against the latest version of the simapp. github.com/Finschia/finschia-sdk/simapp => ../simapp - // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1 diff --git a/x/bankplus/deprecator.go b/x/bankplus/deprecator.go index cc67ecbe12..f3438853e2 100644 --- a/x/bankplus/deprecator.go +++ b/x/bankplus/deprecator.go @@ -51,8 +51,12 @@ func DeprecateBankPlus(ctx context.Context, bankStoreService store.KVStoreServic iter := storetypes.KVStorePrefixIterator(adapter, inactiveAddrsKeyPrefix) defer iter.Close() + keys := [][]byte{} for ; iter.Valid(); iter.Next() { - err := kvStore.Delete(iter.Key()) + keys = append(keys, iter.Key()) + } + for _, key := range keys { + err := kvStore.Delete(key) if err != nil { return err }