Remove unnecessary logging and correct formatting

This commit is contained in:
Age Manning
2019-11-28 15:05:25 +11:00
parent 6f2fc7560a
commit c78fe81a89
5 changed files with 14 additions and 29 deletions

View File

@@ -6,7 +6,7 @@ use beacon_chain::{
use eth2_libp2p::rpc::methods::*;
use eth2_libp2p::rpc::{RPCEvent, RPCRequest, RPCResponse, RequestId};
use eth2_libp2p::PeerId;
use slog::{debug, error, info, o, trace, warn};
use slog::{debug, info, o, trace, warn};
use ssz::Encode;
use std::sync::Arc;
use store::Store;
@@ -475,13 +475,8 @@ impl<T: BeaconChainTypes> MessageProcessor<T> {
SHOULD_NOT_FORWARD_GOSSIP_BLOCK //TODO: Decide if we want to forward these
}
},
Err(e) => {
error!(
self.log,
"Error processing gossip beacon block";
"error" => format!("{:?}", e),
"block slot" => block.slot
);
Err(_) => {
// error is logged during the processing therefore no error is logged here
trace!(
self.log,
"Erroneous gossip beacon block ssz";
@@ -525,13 +520,13 @@ impl<T: BeaconChainTypes> MessageProcessor<T> {
self.network.disconnect(peer_id, GoodbyeReason::Fault);
}
},
Err(e) => {
Err(_) => {
// error is logged during the processing therefore no error is logged here
trace!(
self.log,
"Erroneous gossip attestation ssz";
"ssz" => format!("0x{}", hex::encode(msg.as_ssz_bytes())),
);
error!(self.log, "Invalid gossip attestation"; "error" => format!("{:?}", e));
}
}
}