From 4af04d5ae4d4bda94ddfd5850e068b9b1e911bcc Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Tue, 25 Feb 2025 14:08:45 +0100 Subject: [PATCH] chore(core): close all workflows when channel is replaced [no changelog] --- core/src/trezor/wire/thp/channel.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/trezor/wire/thp/channel.py b/core/src/trezor/wire/thp/channel.py index 90e357802c..82664fe189 100644 --- a/core/src/trezor/wire/thp/channel.py +++ b/core/src/trezor/wire/thp/channel.py @@ -121,6 +121,9 @@ class Channel: required_state=ChannelState.ENCRYPTED_TRANSPORT, required_key=CHANNEL_HOST_STATIC_PUBKEY, ) + if was_any_replaced: + # In case a channel was replaced, close all running workflows + workflow.close_others() log.debug(__name__, "Was any channel replaced? %s", str(was_any_replaced)) def is_channel_to_replace(self) -> bool: