From 27cf1220c38cc9af254ea4cb25311a2f6e5bd5c1 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Sat, 11 Nov 2023 09:48:53 +0800 Subject: [PATCH] fix: cleanup close init after close confirmed (#1326) * fix: cleanup close init after close confirmed * Update CHANGELOG.md --- CHANGELOG.md | 1 + relayer/processor/path_processor_internal.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5bac4406..da7a3e166 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ * [\#1303](https://github.com/cosmos/relayer/pull/1303) Add missing max gas amount on txf to avoid estimate less gas when simualte runTx. * [\#1324](https://github.com/cosmos/relayer/pull/1324) Add log-level in global config. * [\#1325](https://github.com/cosmos/relayer/pull/1325) Ignore only file not exist error when loadConfigFile. +* [\#1326](https://github.com/cosmos/relayer/pull/1326) Avoid sending channel close confirm message after channel get closed successfully. ## v0.9.3 diff --git a/relayer/processor/path_processor_internal.go b/relayer/processor/path_processor_internal.go index 58bbcc4a5..60d10b19c 100644 --- a/relayer/processor/path_processor_internal.go +++ b/relayer/processor/path_processor_internal.go @@ -645,6 +645,10 @@ func (pp *PathProcessor) unrelayedChannelCloseMessages( msgCloseConfirm, pathEndChannelCloseMessages.Src, ) { res.DstMessages = append(res.DstMessages, msgCloseConfirm) + toDeleteSrc[chantypes.EventTypeChannelCloseInit] = append( + toDeleteSrc[chantypes.EventTypeChannelCloseInit], + chanKey, + ) } // TODO: confirm chankey does not need modification