Skip to content

Commit ab8ab42

Browse files
authored
fix: emit ics29 events on cacheCtx write after refunding on closed channel (#1344)
## Description closes: #1323 --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [ ] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing) - [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`) - [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [ ] Re-reviewed `Files changed` in the Github PR explorer - [ ] Review `Codecov Report` in the comment section below once CI passes
1 parent dcd0681 commit ab8ab42

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/apps/29-fee/keeper/escrow.go

+3
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ func (k Keeper) RefundFeesOnChannelClosure(ctx sdk.Context, portID, channelID st
225225
k.DeleteFeesInEscrow(cacheCtx, identifiedPacketFee.PacketId)
226226
}
227227

228+
// NOTE: The context returned by CacheContext() refers to a new EventManager, so it needs to explicitly set events to the original context.
229+
ctx.EventManager().EmitEvents(cacheCtx.EventManager().Events())
230+
228231
// write the cache
229232
writeFn()
230233

0 commit comments

Comments
 (0)