Downgrade sync and rpc warn logs (#1417)

* Downgrade sycn and rpc warn logs

* Correct warning
This commit is contained in:
Age Manning
2020-07-30 13:52:44 +10:00
committed by GitHub
parent febb300a2d
commit a37e75f44b
4 changed files with 36 additions and 36 deletions

View File

@@ -10,7 +10,7 @@ use futures::Stream;
use hashset_delay::HashSetDelay;
use libp2p::core::multiaddr::Protocol as MProtocol;
use libp2p::identify::IdentifyInfo;
use slog::{crit, debug, error, warn};
use slog::{crit, debug, error};
use smallvec::SmallVec;
use std::{
net::SocketAddr,
@@ -307,7 +307,7 @@ impl<TSpec: EthSpec> PeerManager<TSpec> {
pub fn handle_rpc_error(&mut self, peer_id: &PeerId, protocol: Protocol, err: &RPCError) {
let client = self.network_globals.client(peer_id);
let score = self.network_globals.peers.read().score(peer_id);
warn!(self.log, "RPC Error"; "protocol" => protocol.to_string(), "err" => err.to_string(), "client" => client.to_string(), "peer_id" => peer_id.to_string(), "score" => score.to_string());
debug!(self.log, "RPC Error"; "protocol" => protocol.to_string(), "err" => err.to_string(), "client" => client.to_string(), "peer_id" => peer_id.to_string(), "score" => score.to_string());
// Map this error to a `PeerAction` (if any)
let peer_action = match err {

View File

@@ -60,12 +60,12 @@ pub fn spawn_block_processor<T: BeaconChainTypes>(
BatchProcessResult::Success
}
(imported_blocks, Err(e)) if imported_blocks > 0 => {
warn!(log, "Batch processing failed but imported some blocks";
debug!(log, "Batch processing failed but imported some blocks";
"id" => *batch_id, "error" => e, "imported_blocks"=> imported_blocks);
BatchProcessResult::Partial
}
(_, Err(e)) => {
warn!(log, "Batch processing failed"; "id" => *batch_id, "error" => e);
debug!(log, "Batch processing failed"; "id" => *batch_id, "error" => e);
BatchProcessResult::Failed
}
};
@@ -237,7 +237,7 @@ fn handle_failed_chain_segment(error: BlockError, log: &slog::Logger) -> Result<
Err(format!("Internal error whilst processing block: {:?}", e))
}
other => {
warn!(
debug!(
log, "Invalid block received";
"msg" => "peer sent invalid block",
"outcome" => format!("{:?}", other),

View File

@@ -644,7 +644,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
request_id: RequestId,
) -> Option<ProcessingResult> {
if let Some(batch) = self.pending_batches.remove(request_id) {
warn!(self.log, "Batch failed. RPC Error";
debug!(self.log, "Batch failed. RPC Error";
"chain_id" => self.id,
"id" => *batch.id,
"retries" => batch.retries,