From ab5bc2bc0614f81aed258cd428077fb938fc7336 Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Thu, 28 Mar 2019 13:04:33 -0400 Subject: [PATCH 1/3] zero export bugfix --- .pending/bugfixes/gaia/3656-distribution-de | 1 + cmd/gaia/app/export.go | 2 ++ 2 files changed, 3 insertions(+) create mode 100644 .pending/bugfixes/gaia/3656-distribution-de diff --git a/.pending/bugfixes/gaia/3656-distribution-de b/.pending/bugfixes/gaia/3656-distribution-de new file mode 100644 index 000000000000..9f5264a18c7e --- /dev/null +++ b/.pending/bugfixes/gaia/3656-distribution-de @@ -0,0 +1 @@ +#3656 distribution delegation zero export bugfix diff --git a/cmd/gaia/app/export.go b/cmd/gaia/app/export.go index 3bd439396262..1bb6f937faa0 100644 --- a/cmd/gaia/app/export.go +++ b/cmd/gaia/app/export.go @@ -117,7 +117,9 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []st // reinitialize all delegations for _, del := range dels { + app.distrKeeper.DeleteDelegatorStartingInfo(ctx, del.ValidatorAddress, del.DelegatorAddress) app.distrKeeper.Hooks().BeforeDelegationCreated(ctx, del.DelegatorAddress, del.ValidatorAddress) + app.distrKeeper.Hooks().AfterDelegationModified(ctx, del.DelegatorAddress, del.ValidatorAddress) } // reset context height From d76aad815f33787c11ff0c0e8d200a948fe1159b Mon Sep 17 00:00:00 2001 From: rigelrozanski Date: Thu, 28 Mar 2019 14:44:28 -0400 Subject: [PATCH 2/3] remove unused line --- cmd/gaia/app/export.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/gaia/app/export.go b/cmd/gaia/app/export.go index 1bb6f937faa0..773a718388a9 100644 --- a/cmd/gaia/app/export.go +++ b/cmd/gaia/app/export.go @@ -117,7 +117,6 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []st // reinitialize all delegations for _, del := range dels { - app.distrKeeper.DeleteDelegatorStartingInfo(ctx, del.ValidatorAddress, del.DelegatorAddress) app.distrKeeper.Hooks().BeforeDelegationCreated(ctx, del.DelegatorAddress, del.ValidatorAddress) app.distrKeeper.Hooks().AfterDelegationModified(ctx, del.DelegatorAddress, del.ValidatorAddress) } From c990bd030c0bbe2725da5ec16c0710f007b703b3 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 2 Apr 2019 10:23:01 -0400 Subject: [PATCH 3/3] Fix pending log entry --- .pending/bugfixes/gaia/3656-distribution-de | 1 - .pending/bugfixes/gaia/3999-fix-distribution-export | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .pending/bugfixes/gaia/3656-distribution-de create mode 100644 .pending/bugfixes/gaia/3999-fix-distribution-export diff --git a/.pending/bugfixes/gaia/3656-distribution-de b/.pending/bugfixes/gaia/3656-distribution-de deleted file mode 100644 index 9f5264a18c7e..000000000000 --- a/.pending/bugfixes/gaia/3656-distribution-de +++ /dev/null @@ -1 +0,0 @@ -#3656 distribution delegation zero export bugfix diff --git a/.pending/bugfixes/gaia/3999-fix-distribution-export b/.pending/bugfixes/gaia/3999-fix-distribution-export new file mode 100644 index 000000000000..25d34de6c4ce --- /dev/null +++ b/.pending/bugfixes/gaia/3999-fix-distribution-export @@ -0,0 +1 @@ +#3999 Fix distribution delegation for zero height export bug