mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-25 07:29:32 -05:00
Preemptively Box few messages
This commit is contained in:
parent
3fa4ffa82c
commit
ecb54958ee
@ -230,7 +230,7 @@ pub enum OutEvent {
|
||||
channel: ResponseChannel<AliceToBob>,
|
||||
},
|
||||
Message1 {
|
||||
msg: bob::Message1,
|
||||
msg: Box<bob::Message1>,
|
||||
channel: ResponseChannel<AliceToBob>,
|
||||
},
|
||||
Message2 {
|
||||
@ -239,7 +239,7 @@ pub enum OutEvent {
|
||||
},
|
||||
ExecutionSetupDone(Result<Box<State3>>),
|
||||
TransferProofAcknowledged,
|
||||
EncryptedSignature(EncryptedSignature),
|
||||
EncryptedSignature(Box<EncryptedSignature>),
|
||||
}
|
||||
|
||||
impl From<peer_tracker::OutEvent> for OutEvent {
|
||||
@ -272,7 +272,10 @@ impl From<message0::OutEvent> for OutEvent {
|
||||
impl From<message1::OutEvent> for OutEvent {
|
||||
fn from(event: message1::OutEvent) -> Self {
|
||||
match event {
|
||||
message1::OutEvent::Msg { msg, channel } => OutEvent::Message1 { msg, channel },
|
||||
message1::OutEvent::Msg { msg, channel } => OutEvent::Message1 {
|
||||
msg: Box::new(msg),
|
||||
channel,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -307,7 +310,7 @@ impl From<transfer_proof::OutEvent> for OutEvent {
|
||||
impl From<encrypted_signature::OutEvent> for OutEvent {
|
||||
fn from(event: encrypted_signature::OutEvent) -> Self {
|
||||
match event {
|
||||
encrypted_signature::OutEvent::Msg(msg) => OutEvent::EncryptedSignature(msg),
|
||||
encrypted_signature::OutEvent::Msg(msg) => OutEvent::EncryptedSignature(Box::new(msg)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ impl EventLoop {
|
||||
let _ = self.recv_message0.send((*msg, channel)).await;
|
||||
}
|
||||
OutEvent::Message1 { msg, channel } => {
|
||||
let _ = self.recv_message1.send((msg, channel)).await;
|
||||
let _ = self.recv_message1.send((*msg, channel)).await;
|
||||
}
|
||||
OutEvent::Message2 { msg, bob_peer_id : _} => {
|
||||
let _ = self.recv_message2.send(*msg).await;
|
||||
@ -257,7 +257,7 @@ impl EventLoop {
|
||||
let _ = self.recv_transfer_proof_ack.send(()).await;
|
||||
}
|
||||
OutEvent::EncryptedSignature(msg) => {
|
||||
let _ = self.recv_encrypted_signature.send(msg).await;
|
||||
let _ = self.recv_encrypted_signature.send(*msg).await;
|
||||
}
|
||||
OutEvent::Request(event) => {
|
||||
let _ = self.request.send(*event).await;
|
||||
|
Loading…
Reference in New Issue
Block a user