From da17a6d7253e258a286d72c92205b9c819666102 Mon Sep 17 00:00:00 2001 From: frog power 4000 Date: Tue, 2 Apr 2019 10:24:46 -0400 Subject: [PATCH 1/5] Merge PR #3999: Fix distribution zero height export bug --- .pending/bugfixes/gaia/3999-fix-distribution-export | 1 + cmd/gaia/app/export.go | 1 + 2 files changed, 2 insertions(+) create mode 100644 .pending/bugfixes/gaia/3999-fix-distribution-export diff --git a/.pending/bugfixes/gaia/3999-fix-distribution-export b/.pending/bugfixes/gaia/3999-fix-distribution-export new file mode 100644 index 0000000000..25d34de6c4 --- /dev/null +++ b/.pending/bugfixes/gaia/3999-fix-distribution-export @@ -0,0 +1 @@ +#3999 Fix distribution delegation for zero height export bug diff --git a/cmd/gaia/app/export.go b/cmd/gaia/app/export.go index 3bd4393962..773a718388 100644 --- a/cmd/gaia/app/export.go +++ b/cmd/gaia/app/export.go @@ -118,6 +118,7 @@ func (app *GaiaApp) prepForZeroHeightGenesis(ctx sdk.Context, jailWhiteList []st // reinitialize all delegations for _, del := range dels { app.distrKeeper.Hooks().BeforeDelegationCreated(ctx, del.DelegatorAddress, del.ValidatorAddress) + app.distrKeeper.Hooks().AfterDelegationModified(ctx, del.DelegatorAddress, del.ValidatorAddress) } // reset context height From 1822dee416d77afc434f332abfc85c9b2f189595 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 2 Apr 2019 10:27:37 -0400 Subject: [PATCH 2/5] Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3eeb79a92..96338760e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.31.1 + +### Bug Fixes + +#### Gaia + +* [\#3999](https://github.com/cosmos/cosmos-sdk/issues/3999) Fix distribution delegation for zero height export bug + ## 0.33.0 BREAKING CHANGES From 7d85a064225bc2c57f4dbf4c3af5db0f9e47ed01 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 2 Apr 2019 10:34:17 -0400 Subject: [PATCH 3/5] Fix link in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96338760e0..1f03ff1670 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ #### Gaia -* [\#3999](https://github.com/cosmos/cosmos-sdk/issues/3999) Fix distribution delegation for zero height export bug +* [\#3999](https://github.com/cosmos/cosmos-sdk/pull/3999) Fix distribution delegation for zero height export bug ## 0.33.0 From cc534d73944684591ffade09f1721e5b589f966e Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 2 Apr 2019 10:41:29 -0400 Subject: [PATCH 4/5] Remove pending log --- .pending/bugfixes/gaia/3999-fix-distribution-export | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .pending/bugfixes/gaia/3999-fix-distribution-export diff --git a/.pending/bugfixes/gaia/3999-fix-distribution-export b/.pending/bugfixes/gaia/3999-fix-distribution-export deleted file mode 100644 index 25d34de6c4..0000000000 --- a/.pending/bugfixes/gaia/3999-fix-distribution-export +++ /dev/null @@ -1 +0,0 @@ -#3999 Fix distribution delegation for zero height export bug From d0152b35c162e1d66a360927a3f24855a26141d4 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 2 Apr 2019 10:56:35 -0400 Subject: [PATCH 5/5] Fix version in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f03ff1670..6b37137b26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## 0.31.1 +## 0.33.1 ### Bug Fixes