Improve network logging

This commit is contained in:
Franck Royer 2021-01-22 09:38:04 +11:00
parent f84cd001b5
commit c25d5ff07e
No known key found for this signature in database
GPG key ID: A82ED75A8DFC50A4
12 changed files with 21 additions and 19 deletions

View file

@ -1,3 +1,8 @@
use crate::{
monero,
network::request_response::{AliceToBob, BobToAlice, Codec, Swap, TIMEOUT},
protocol::bob,
};
use anyhow::{anyhow, Result};
use libp2p::{
request_response::{
@ -15,12 +20,6 @@ use std::{
};
use tracing::{debug, error};
use crate::{
monero,
network::request_response::{AliceToBob, BobToAlice, Codec, Swap, TIMEOUT},
protocol::bob,
};
#[derive(Debug)]
pub struct OutEvent {
pub msg: bob::SwapRequest,
@ -109,7 +108,7 @@ impl NetworkBehaviourEventProcess<RequestResponseEvent<BobToAlice, AliceToBob>>
error!("Outbound failure: {:?}", error);
}
RequestResponseEvent::ResponseSent { .. } => {
debug!("Alice has sent an Amounts response to Bob");
debug!("Alice has sent a swap response to Bob");
}
}
}