-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(x/auth): Fix system test #20531
Changes from 1 commit
214605b
aefee6a
495ab79
f761eb1
13cd0df
9c3170a
c32693e
af58812
3b33ae9
e6afd5e
521c566
c1a08da
dfebc64
d1244ae
94e9b2b
1d9cfcf
d4d9a11
ba123e6
c43114f
e5206f6
179641d
663ef59
610ef6f
7388cbd
3441aae
e68685a
51742cc
f60aa6b
49ef1e3
5f9818b
053ae26
eae8154
3ef3407
c9aa0f2
6cf6894
c22d05c
75d5bab
c2c2b1c
69d6738
1d1b745
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -338,3 +338,18 @@ func (ak AccountKeeper) NonAtomicMsgsExec(ctx context.Context, signer sdk.AccAdd | |
|
||
return msgResponses, nil | ||
} | ||
|
||
// 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. | ||
func (ak AccountKeeper) MigrateAccountNumberUnsafe(ctx context.Context) error { | ||
sontrinh16 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
currentAccNum, err := ak.RemoveLegacyAccountNumber(ctx) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
err = ak.AccountsModKeeper.InitAccountNumberSeqUnsafe(ctx, currentAccNum) | ||
|
||
return err | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Review the usage of The |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add that this should be done in the ugprade handler of an app when wanting using x/accounts.
Can we have this as a diff of upgrade.go like we did for protocolpool?