From c40017719c6295438c9f326681cce9e1d894c0df Mon Sep 17 00:00:00 2001 From: binarybaron Date: Fri, 7 Jan 2022 01:17:36 +0100 Subject: [PATCH] Inform Bob that he has been punished --- swap/src/protocol/bob/swap.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/swap/src/protocol/bob/swap.rs b/swap/src/protocol/bob/swap.rs index f8367ca9..c82bf10e 100644 --- a/swap/src/protocol/bob/swap.rs +++ b/swap/src/protocol/bob/swap.rs @@ -278,9 +278,12 @@ async fn next_state( state.publish_refund_btc(bitcoin_wallet).await?; BobState::BtcRefunded(state) } - ExpiredTimelocks::Punish => BobState::BtcPunished { - tx_lock_id: state.tx_lock_id(), - }, + ExpiredTimelocks::Punish => { + tracing::info!("You have been punished for not refunding in time"); + BobState::BtcPunished { + tx_lock_id: state.tx_lock_id(), + } + } } } BobState::BtcRefunded(state4) => BobState::BtcRefunded(state4),