From eae815481d8bf9514e25eeee0f1d87cc7480d09c Mon Sep 17 00:00:00 2001 From: sontrinh16 Date: Tue, 11 Jun 2024 17:20:43 +0700 Subject: [PATCH] changelog, add detail err log --- CHANGELOG.md | 1 + x/auth/keeper/keeper.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 21784defaa04..82449cabf0dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -199,6 +199,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (simapp) [#19146](https://github.com/cosmos/cosmos-sdk/pull/19146) Replace `--v` CLI option with `--validator-count`/`-n`. * (module) [#19370](https://github.com/cosmos/cosmos-sdk/pull/19370) Deprecate `module.Configurator`, use `appmodule.HasMigrations` and `appmodule.HasServices` instead from Core API. +* (x/auth) [#20531](https://github.com/cosmos/cosmos-sdk/pull/20531) Deprecate auth keeper `NextAccountNumber`, use `keeper.AccountsModKeeper.NextAccountNumber` instead. ## [v0.50.7](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.50.7) - 2024-06-04 diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index c70f6c7d2c3d..ff30374e0f8d 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -342,11 +342,11 @@ func (ak AccountKeeper) NonAtomicMsgsExec(ctx context.Context, signer sdk.AccAdd // MigrateAccountNumberUnsafe migrates auth's account number to accounts's account number // and delete store entry for auth legacy GlobalAccountNumberKey. // -// Should only use in an upgrade handler for migrate process. +// Should only use in an upgrade handler for migrating account number. func (ak AccountKeeper) MigrateAccountNumberUnsafe(ctx context.Context) error { currentAccNum, err := ak.RemoveLegacyAccountNumber(ctx) if err != nil { - return err + return fmt.Errorf("failed to migrate account number: %w", err) } err = ak.AccountsModKeeper.InitAccountNumberSeqUnsafe(ctx, currentAccNum)