diff --git a/swap/src/protocol/bob.rs b/swap/src/protocol/bob.rs index 7117365b..5ca668bd 100644 --- a/swap/src/protocol/bob.rs +++ b/swap/src/protocol/bob.rs @@ -185,7 +185,7 @@ pub enum OutEvent { }, EncryptedSignatureAcknowledged, ResponseSent, // Same variant is used for all messages as no processing is done - Failure(Error), + CommunicationError(Error), } impl From for OutEvent { @@ -203,7 +203,7 @@ impl From for OutEvent { use quote_request::OutEvent::*; match event { MsgReceived(quote_response) => OutEvent::QuoteResponse(quote_response), - Failure(err) => OutEvent::Failure(err.context("Failure with Quote Request")), + Failure(err) => OutEvent::CommunicationError(err.context("Failure with Quote Request")), } } } @@ -225,7 +225,7 @@ impl From for OutEvent { channel, }, AckSent => OutEvent::ResponseSent, - Failure(err) => OutEvent::Failure(err.context("Failure with Transfer Proof")), + Failure(err) => OutEvent::CommunicationError(err.context("Failure with Transfer Proof")), } } } @@ -235,7 +235,7 @@ impl From for OutEvent { use encrypted_signature::OutEvent::*; match event { Acknowledged => OutEvent::EncryptedSignatureAcknowledged, - Failure(err) => OutEvent::Failure(err.context("Failure with Encrypted Signature")), + Failure(err) => OutEvent::CommunicationError(err.context("Failure with Encrypted Signature")), } } } diff --git a/swap/src/protocol/bob/event_loop.rs b/swap/src/protocol/bob/event_loop.rs index e31b429f..23ca57e1 100644 --- a/swap/src/protocol/bob/event_loop.rs +++ b/swap/src/protocol/bob/event_loop.rs @@ -192,7 +192,7 @@ impl EventLoop { debug!("Alice acknowledged encrypted signature"); } OutEvent::ResponseSent => {} - OutEvent::Failure(err) => { + OutEvent::CommunicationError(err) => { error!("Communication error: {:#}", err) } }