From 9b4ca28f14ee49882886b9bed2a7b6e4bc502809 Mon Sep 17 00:00:00 2001 From: colin axner <25233464+colin-axner@users.noreply.github.com> Date: Thu, 25 May 2023 17:40:48 +0200 Subject: [PATCH 1/5] Revert "Save gas on IsFeeEnabled (backport #2786) (#2815)" This reverts commit 4bb451c8661540cccd75d3a1ca9ab6325c2dd8f7. --- CHANGELOG.md | 2 +- modules/apps/29-fee/keeper/keeper.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81b157e76c6..5e5fc3ba697 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,7 +42,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements -* (apps/29-fee) [\#2786](https://github.com/cosmos/ibc-go/pull/2786) Save gas by checking key existence with `KVStore`'s `Has` method. +### Features ### Bug Fixes diff --git a/modules/apps/29-fee/keeper/keeper.go b/modules/apps/29-fee/keeper/keeper.go index 585ea5cbe6b..c60942debea 100644 --- a/modules/apps/29-fee/keeper/keeper.go +++ b/modules/apps/29-fee/keeper/keeper.go @@ -121,7 +121,7 @@ func (k Keeper) DeleteFeeEnabled(ctx sdk.Context, portID, channelID string) { // fee enabled flag for the given port and channel identifiers func (k Keeper) IsFeeEnabled(ctx sdk.Context, portID, channelID string) bool { store := ctx.KVStore(k.storeKey) - return store.Has(types.KeyFeeEnabled(portID, channelID)) + return store.Get(types.KeyFeeEnabled(portID, channelID)) != nil } // GetAllFeeEnabledChannels returns a list of all ics29 enabled channels containing portID & channelID that are stored in state From 8ebd036327c51c524e42f5735be97d97d632da76 Mon Sep 17 00:00:00 2001 From: colin axner <25233464+colin-axner@users.noreply.github.com> Date: Thu, 25 May 2023 17:44:51 +0200 Subject: [PATCH 2/5] update CHANGELOG --- CHANGELOG.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e5fc3ba697..247ccfed588 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,10 +40,6 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. -### Improvements - -### Features - ### Bug Fixes * [\#3346](https://github.com/cosmos/ibc-go/pull/3346) Properly handle ordered channels in `UnreceivedPackets` query. From ddc728b9bb01c2d6055b37de263b0fb420dc46e9 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Thu, 25 May 2023 18:18:54 +0200 Subject: [PATCH 3/5] Update CHANGELOG.md --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 247ccfed588..a739fe3bdb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,12 +34,22 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog +[[Unreleased]] + +### Bug Fixes + +* [\#3661](https://github.com/cosmos/ibc-go/pull/3661) Revert state-machine breaking improvemnt from PR [#2786]([https://github.com/cosmos/ibc-go/pull/3661](https://github.com/cosmos/ibc-go/pull/2786)). + ## [v4.2.1](https://github.com/cosmos/ibc-go/releases/tag/v4.2.1) - 2023-05-25 ### Dependencies * [\#2868](https://github.com/cosmos/ibc-go/pull/2868) Bump ICS 23 to v0.9.0. +### Improvements + +* (apps/29-fee) [\#2786](https://github.com/cosmos/ibc-go/pull/2786) Save gas by checking key existence with `KVStore`'s `Has` method. + ### Bug Fixes * [\#3346](https://github.com/cosmos/ibc-go/pull/3346) Properly handle ordered channels in `UnreceivedPackets` query. From b9a5152bd74ecb072b32cf18c6c2a08ab32fad62 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Thu, 25 May 2023 18:19:12 +0200 Subject: [PATCH 4/5] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a739fe3bdb4..bf067de9812 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,7 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ # Changelog -[[Unreleased]] +## [[Unreleased]] ### Bug Fixes From 864d5b62f35bb9c7e461480380a0b77a072035c7 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Thu, 25 May 2023 18:19:55 +0200 Subject: [PATCH 5/5] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf067de9812..83984ebbedc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Bug Fixes -* [\#3661](https://github.com/cosmos/ibc-go/pull/3661) Revert state-machine breaking improvemnt from PR [#2786]([https://github.com/cosmos/ibc-go/pull/3661](https://github.com/cosmos/ibc-go/pull/2786)). +* [\#3661](https://github.com/cosmos/ibc-go/pull/3661) Revert state-machine breaking improvement from PR [#2786](https://github.com/cosmos/ibc-go/pull/2786). ## [v4.2.1](https://github.com/cosmos/ibc-go/releases/tag/v4.2.1) - 2023-05-25