Force update staking store
This commit is contained in:
parent
6712ea7f3a
commit
74e8159c3f
|
@ -32,11 +32,15 @@ func InitGenesis(ctx sdk.Context, k Keeper, data GenesisState) {
|
|||
k.setPool(ctx, data.Pool)
|
||||
k.setNewParams(ctx, data.Params)
|
||||
for _, validator := range data.Validators {
|
||||
// Staking assumes bonded validators are already stored, need to force update
|
||||
validator.PoolShares.Status = sdk.Unbonded
|
||||
k.updateValidator(ctx, validator)
|
||||
}
|
||||
for _, bond := range data.Bonds {
|
||||
k.setDelegation(ctx, bond)
|
||||
}
|
||||
store := ctx.KVStore(k.storeKey)
|
||||
k.updateBondedValidatorsFull(ctx, store)
|
||||
}
|
||||
|
||||
// WriteGenesis - output genesis parameters
|
||||
|
|
Loading…
Reference in New Issue