From 42aa4f55f28d6021d65afbc88e760a0ab6b0d3b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Thu, 7 Mar 2024 12:32:43 +0000 Subject: [PATCH 1/2] state/write_log: clear IBC events in `fn drop_tx` --- crates/state/src/write_log.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/state/src/write_log.rs b/crates/state/src/write_log.rs index 6ce1f31d54..a3f25797eb 100644 --- a/crates/state/src/write_log.rs +++ b/crates/state/src/write_log.rs @@ -473,12 +473,13 @@ impl WriteLog { self.take_ibc_events(); } - /// Drop the current transaction's write log and precommit when it's - /// declined by any of the triggered validity predicates. Starts a new - /// transaction write log. + /// Drop the current transaction's write log and IBC events and precommit + /// when it's declined by any of the triggered validity predicates. + /// Starts a new transaction write log. pub fn drop_tx(&mut self) { self.tx_precommit_write_log.clear(); self.tx_write_log.clear(); + self.ibc_events.clear(); } /// Drop the current transaction's write log but keep the precommit one. From 49a6bd8fd83bfbd8c07972134d28d1e029f942fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Zemanovi=C4=8D?= Date: Fri, 8 Mar 2024 09:49:23 +0000 Subject: [PATCH 2/2] changelog: add #2850 --- .changelog/unreleased/bug-fixes/2850-clear-ibc-events.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .changelog/unreleased/bug-fixes/2850-clear-ibc-events.md diff --git a/.changelog/unreleased/bug-fixes/2850-clear-ibc-events.md b/.changelog/unreleased/bug-fixes/2850-clear-ibc-events.md new file mode 100644 index 0000000000..72fefc4300 --- /dev/null +++ b/.changelog/unreleased/bug-fixes/2850-clear-ibc-events.md @@ -0,0 +1,2 @@ +- Clear IBC events emitted from rejected txs. + ([\#2850](https://github.com/anoma/namada/pull/2850)) \ No newline at end of file