Skip to content

Commit

Permalink
less ambiguos struct name
Browse files Browse the repository at this point in the history
  • Loading branch information
nghuyenthevinh2000 committed Nov 24, 2023
1 parent 05ed5ac commit c787862
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/upgrades/forks/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ var VersionMapEnableFork = upgrades.Fork{
}

type Acc struct {
Address string
AccountNumber uint64
Address string
Sequence uint64
}

var affectedAccounts = []Acc{}
Expand Down
6 changes: 3 additions & 3 deletions app/upgrades/forks/forks.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ func runForkLogicCorrectAccountSequence(ctx sdk.Context, keppers *keepers.AppKee
for _, acc := range affectedAccounts {
account := keppers.AccountKeeper.GetAccount(ctx, sdk.MustAccAddressFromBech32(acc.Address))
// check if local account sequence is equal to targeted account sequence
if account.GetSequence() == acc.AccountNumber {
if account.GetSequence() == acc.Sequence {
ctx.Logger().Info(fmt.Sprintf("Account %s sequence is already correct", acc.Address))
continue
}

account.SetSequence(acc.AccountNumber)
account.SetSequence(acc.Sequence)
keppers.AccountKeeper.SetAccount(ctx, account)
ctx.Logger().Info(fmt.Sprintf("Account %s sequence is corrected to %d", acc.Address, acc.AccountNumber))
ctx.Logger().Info(fmt.Sprintf("Account %s sequence is corrected to %d", acc.Address, acc.Sequence))
}
}
}

0 comments on commit c787862

Please sign in to comment.