-
Notifications
You must be signed in to change notification settings - Fork 370
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
Remove expired vesting periods from accounts in migrations #1113
Conversation
spendable balance, and other vesting specific functions
@@ -13,8 +13,8 @@ import ( | |||
) | |||
|
|||
var ( | |||
GenesisTime = time.Date(2021, 11, 30, 15, 0, 0, 0, time.UTC) | |||
ChainID = "kava-8" | |||
GenesisTime = time.Date(2022, 1, 19, 16, 0, 0, 0, time.UTC) |
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.
Genesis time is updated to launch date
GenesisTime = time.Date(2021, 11, 30, 15, 0, 0, 0, time.UTC) | ||
ChainID = "kava-8" | ||
GenesisTime = time.Date(2022, 1, 19, 16, 0, 0, 0, time.UTC) | ||
ChainID = "kava-9" |
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.
Chain id is updated to kava-9
@@ -43,3 +56,115 @@ func TestMigrateFull(t *testing.T) { | |||
tApp.InitializeFromGenesisStatesWithTimeAndChainID(newGenDoc.GenesisTime, newGenDoc.ChainID, app.GenesisState(appMap)) | |||
}) | |||
} | |||
|
|||
func TestAccountBalances(t *testing.T) { | |||
t.Skip() // avoid committing test data |
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.
Skipped in integration, passing locally against exported state of block 1627000
@@ -0,0 +1,485 @@ | |||
package legacyaccounts |
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.
This is used in the migrate test instead of the legacy types from the cosmos-sdk. The cosmos-sdk types do not implement Spendable, etc methods.
Added an e2e test and account migration looks good |
ResetPeriodicVestingAccount
function copied from v15 migration.Testing
Updates the tests to use a fixed test genesis time to allow for the actual migration genesis time to be changed without breaking tests.
Test data json file changes: