# MutantHub mutant #3792: Clear() moved before the announced-while-reconciling filter in HandleSketchExtension, emptying the filter set
# Repository: bitcoin/bitcoin @ 37912ec1789ab2384982a3a045f9e864fdccf722
# File: src/node/txreconciliation_impl.cpp:329-335
# Review: APPROVED; outcome: SURVIVED
diff --git a/src/node/txreconciliation_impl.cpp b/src/node/txreconciliation_impl.cpp
index 6972dfc..dbf9dce 100644
--- a/src/node/txreconciliation_impl.cpp
+++ b/src/node/txreconciliation_impl.cpp
@@ -326,14 +326,14 @@ private:
                 peer_id, txs_to_announce.size());
         }
 
+        // Update local reconciliation state for the peer.
+        peer_state.Clear();
+
         // Filter out transactions received from the peer while reconciling.
         std::erase_if(txs_to_announce, [&peer_state](const auto& x) {
             return peer_state.m_announced_while_reconciling.contains(x);
         });
 
-        // Update local reconciliation state for the peer.
-        peer_state.Clear();
-
         return HandleSketchResult{txs_to_request, txs_to_announce, result};
     }
