Use event_process = false for Bob

As we do not process the event, we can just implement the needed `From`
traits.
This commit is contained in:
Franck Royer 2021-02-05 16:30:43 +11:00
parent a7b89e2fe4
commit eefb1b3b16
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
5 changed files with 95 additions and 134 deletions

View file

@ -190,13 +190,21 @@ impl EventLoop {
OutEvent::ExecutionSetupDone(res) => {
let _ = self.done_execution_setup.send(res.map(|state|*state)).await;
}
OutEvent::TransferProof(msg) => {
OutEvent::TransferProof{ msg, channel }=> {
let _ = self.recv_transfer_proof.send(*msg).await;
// Send back empty response so that the request/response protocol completes.
if let Err(error) = self.swarm.transfer_proof.send_ack(channel) {
error!("Failed to send Transfer Proof ack: {:?}", error);
}
}
OutEvent::EncryptedSignatureAcknowledged => {
debug!("Alice acknowledged encrypted signature");
let _ = self.recv_encrypted_signature_ack.send(()).await;
}
OutEvent::ResponseSent => {}
OutEvent::Failure(err) => {
error!("Communication error: {:#}", err)
}
}
},
option = self.dial_alice.recv().fuse() => {