From eacf3c21f56775fc3a99a57a9903a48ee54c85bf Mon Sep 17 00:00:00 2001 From: Yarom Swisa Date: Thu, 30 Jan 2025 18:05:06 +0200 Subject: [PATCH] fix migrator 6To7 dualstaking --- scripts/init_chain_commands.sh | 2 +- x/dualstaking/keeper/migrations.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/init_chain_commands.sh b/scripts/init_chain_commands.sh index 6244802a74..d993671cf7 100755 --- a/scripts/init_chain_commands.sh +++ b/scripts/init_chain_commands.sh @@ -118,5 +118,5 @@ if [[ "$1" != "--skip-providers" ]]; then . ${__dir}/setup_providers.sh echo "letting providers start and running health check" sleep 10 -lavap test health $HEALTH_FILE +# lavap test health $HEALTH_FILE fi diff --git a/x/dualstaking/keeper/migrations.go b/x/dualstaking/keeper/migrations.go index 3d15423764..4fdbf08e34 100644 --- a/x/dualstaking/keeper/migrations.go +++ b/x/dualstaking/keeper/migrations.go @@ -89,7 +89,7 @@ func (m Migrator) MigrateVersion5To6(ctx sdk.Context) error { func (m Migrator) MigrateVersion6To7(ctx sdk.Context) error { // set all delegations to have a timestamp of 30 days ago allDelegations, err := m.keeper.GetAllDelegations(ctx) - if err != nil { + if err == nil { for _, delegation := range allDelegations { delegation.Timestamp = ctx.BlockTime().AddDate(0, 0, -30).UTC().Unix() m.keeper.SetDelegation(ctx, delegation)