Add msg type in the log (#46)
This commit is contained in:
parent
a25bc27d09
commit
b66d7abf9d
|
@ -258,8 +258,8 @@ impl MixNode {
|
|||
self.slot_update_sender.send(elapsed).unwrap();
|
||||
}
|
||||
|
||||
fn log_message_generated(&self, payload: &Payload) {
|
||||
self.log_message("MessageGenerated", payload);
|
||||
fn log_message_generated(&self, msg_type: &str, payload: &Payload) {
|
||||
self.log_message(format!("{}MessageGenerated", msg_type).as_str(), payload);
|
||||
}
|
||||
|
||||
fn log_message_fully_unwrapped(&self, payload: &Payload) {
|
||||
|
@ -297,7 +297,7 @@ impl Node for MixNode {
|
|||
if let Poll::Ready(Some(_)) = pin!(&mut self.data_msg_lottery_interval).poll_next(&mut cx) {
|
||||
if self.data_msg_lottery.run() {
|
||||
let payload = Payload::new();
|
||||
self.log_message_generated(&payload);
|
||||
self.log_message_generated("Data", &payload);
|
||||
let message = self
|
||||
.crypto_processor
|
||||
.wrap_message(payload.as_bytes())
|
||||
|
@ -335,7 +335,7 @@ impl Node for MixNode {
|
|||
// Generate a cover message probabilistically
|
||||
if let Poll::Ready(Some(_)) = pin!(&mut self.cover_traffic).poll_next(&mut cx) {
|
||||
let payload = Payload::new();
|
||||
self.log_message_generated(&payload);
|
||||
self.log_message_generated("Cover", &payload);
|
||||
let message = self
|
||||
.crypto_processor
|
||||
.wrap_message(payload.as_bytes())
|
||||
|
|
Loading…
Reference in New Issue