mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-01-26 07:16:06 -05:00
Remove dead code
No codepath constructs this event, we can delete the associated code.
This commit is contained in:
parent
2135a6e53e
commit
b1d0ae8db7
@ -108,7 +108,6 @@ impl Builder {
|
|||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum OutEvent {
|
pub enum OutEvent {
|
||||||
ConnectionEstablished(PeerId),
|
|
||||||
QuoteReceived(BidQuote),
|
QuoteReceived(BidQuote),
|
||||||
SpotPriceReceived(spot_price::Response),
|
SpotPriceReceived(spot_price::Response),
|
||||||
ExecutionSetupDone(Result<Box<State2>>),
|
ExecutionSetupDone(Result<Box<State2>>),
|
||||||
|
@ -21,7 +21,6 @@ pub struct EventLoop {
|
|||||||
start_execution_setup: Receiver<State0>,
|
start_execution_setup: Receiver<State0>,
|
||||||
done_execution_setup: Sender<Result<State2>>,
|
done_execution_setup: Sender<Result<State2>>,
|
||||||
recv_transfer_proof: Sender<transfer_proof::Request>,
|
recv_transfer_proof: Sender<transfer_proof::Request>,
|
||||||
conn_established: Sender<PeerId>,
|
|
||||||
send_encrypted_signature: Receiver<EncryptedSignature>,
|
send_encrypted_signature: Receiver<EncryptedSignature>,
|
||||||
request_quote: Receiver<()>,
|
request_quote: Receiver<()>,
|
||||||
recv_quote: Sender<BidQuote>,
|
recv_quote: Sender<BidQuote>,
|
||||||
@ -36,7 +35,6 @@ impl EventLoop {
|
|||||||
let start_execution_setup = Channels::new();
|
let start_execution_setup = Channels::new();
|
||||||
let done_execution_setup = Channels::new();
|
let done_execution_setup = Channels::new();
|
||||||
let recv_transfer_proof = Channels::new();
|
let recv_transfer_proof = Channels::new();
|
||||||
let conn_established = Channels::new();
|
|
||||||
let send_encrypted_signature = Channels::new();
|
let send_encrypted_signature = Channels::new();
|
||||||
let request_spot_price = Channels::new();
|
let request_spot_price = Channels::new();
|
||||||
let recv_spot_price = Channels::new();
|
let recv_spot_price = Channels::new();
|
||||||
@ -50,7 +48,6 @@ impl EventLoop {
|
|||||||
start_execution_setup: start_execution_setup.receiver,
|
start_execution_setup: start_execution_setup.receiver,
|
||||||
done_execution_setup: done_execution_setup.sender,
|
done_execution_setup: done_execution_setup.sender,
|
||||||
recv_transfer_proof: recv_transfer_proof.sender,
|
recv_transfer_proof: recv_transfer_proof.sender,
|
||||||
conn_established: conn_established.sender,
|
|
||||||
send_encrypted_signature: send_encrypted_signature.receiver,
|
send_encrypted_signature: send_encrypted_signature.receiver,
|
||||||
request_spot_price: request_spot_price.receiver,
|
request_spot_price: request_spot_price.receiver,
|
||||||
recv_spot_price: recv_spot_price.sender,
|
recv_spot_price: recv_spot_price.sender,
|
||||||
@ -79,9 +76,6 @@ impl EventLoop {
|
|||||||
tokio::select! {
|
tokio::select! {
|
||||||
swarm_event = self.swarm.next_event().fuse() => {
|
swarm_event = self.swarm.next_event().fuse() => {
|
||||||
match swarm_event {
|
match swarm_event {
|
||||||
SwarmEvent::Behaviour(OutEvent::ConnectionEstablished(peer_id)) => {
|
|
||||||
let _ = self.conn_established.send(peer_id).await;
|
|
||||||
}
|
|
||||||
SwarmEvent::Behaviour(OutEvent::SpotPriceReceived(msg)) => {
|
SwarmEvent::Behaviour(OutEvent::SpotPriceReceived(msg)) => {
|
||||||
let _ = self.recv_spot_price.send(msg).await;
|
let _ = self.recv_spot_price.send(msg).await;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user