Skip to content

Commit

Permalink
Merge PR cosmos#5561: v0.38 Migration Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderbez authored Jan 23, 2020
1 parent 1feb22c commit a4b36b9
Show file tree
Hide file tree
Showing 6 changed files with 316 additions and 21 deletions.
2 changes: 1 addition & 1 deletion x/auth/legacy/v0_38/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func Migrate(authGenState v036auth.GenesisState, genAccountsGenState v036genacco
for i, acc := range genAccountsGenState {
var genAccount GenesisAccount

baseAccount := NewBaseAccount(acc.Address, acc.Coins.Sort(), acc.AccountNumber, acc.Sequence)
baseAccount := NewBaseAccount(acc.Address, acc.Coins.Sort(), nil, acc.AccountNumber, acc.Sequence)

switch {
case !acc.OriginalVesting.IsZero():
Expand Down
8 changes: 4 additions & 4 deletions x/auth/legacy/v0_38/migrate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,21 @@ func TestMigrate(t *testing.T) {
)
})

expectedAcc1 := NewBaseAccount(acc1.Address, acc1.Coins, acc1.AccountNumber, acc1.Sequence)
expectedAcc1 := NewBaseAccount(acc1.Address, acc1.Coins, nil, acc1.AccountNumber, acc1.Sequence)
expectedAcc2 := NewModuleAccount(
NewBaseAccount(acc2.Address, acc2.Coins, acc2.AccountNumber, acc2.Sequence),
NewBaseAccount(acc2.Address, acc2.Coins, nil, acc2.AccountNumber, acc2.Sequence),
acc2.ModuleName, acc2.ModulePermissions...,
)
expectedAcc3 := NewContinuousVestingAccountRaw(
NewBaseVestingAccount(
NewBaseAccount(acc3.Address, acc3.Coins, acc3.AccountNumber, acc3.Sequence),
NewBaseAccount(acc3.Address, acc3.Coins, nil, acc3.AccountNumber, acc3.Sequence),
acc3.OriginalVesting, acc3.DelegatedFree, acc3.DelegatedVesting, acc3.EndTime,
),
acc3.StartTime,
)
expectedAcc4 := NewDelayedVestingAccountRaw(
NewBaseVestingAccount(
NewBaseAccount(acc4.Address, acc4.Coins, acc4.AccountNumber, acc4.Sequence),
NewBaseAccount(acc4.Address, acc4.Coins, nil, acc4.AccountNumber, acc4.Sequence),
acc4.OriginalVesting, acc4.DelegatedFree, acc4.DelegatedVesting, acc4.EndTime,
),
)
Expand Down
Loading

0 comments on commit a4b36b9

Please sign in to comment.