mirror of
https://github.com/logos-co/staking.git
synced 2025-01-11 03:06:24 +00:00
0d28141a98
A previous manager can only migrate once, because the migration address is locked in. A **new** manager is always aware of its previous manager. This means, when a migration happens and is initialized, we know for sure it's always the first time this is happening. We probably don't want a migration to take place if the new manager has already processed epochs, so we're adding a check that its `currentEpoch` must be `0`. This also ensures one of its invariants isn't violated: `epochsOnlyIncrease` and `highEpochsAreNull`.