mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
Rename Bob's Behavior Failure to CommunicationError
Failure does not express what the error represents. It is only used for communication errors for quote requests, receiving the XMR transfer proof and sending the encryption signature.
This commit is contained in:
parent
08b036142f
commit
e66e84085b
@ -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<peer_tracker::OutEvent> for OutEvent {
|
||||
@ -203,7 +203,7 @@ impl From<quote_request::OutEvent> 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<transfer_proof::OutEvent> 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<encrypted_signature::OutEvent> 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")),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ impl EventLoop {
|
||||
debug!("Alice acknowledged encrypted signature");
|
||||
}
|
||||
OutEvent::ResponseSent => {}
|
||||
OutEvent::Failure(err) => {
|
||||
OutEvent::CommunicationError(err) => {
|
||||
error!("Communication error: {:#}", err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user