Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tweak log level for some error message #199

Merged
merged 1 commit into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/protocols/filter/block_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use ckb_constant::sync::INIT_BLOCKS_IN_TRANSIT_PER_PEER;
use ckb_network::{async_trait, bytes::Bytes, CKBProtocolContext, CKBProtocolHandler, PeerIndex};
use ckb_types::{core::BlockNumber, packed, prelude::*};
use golomb_coded_set::{GCSFilterReader, SipHasher24Builder, M, P};
use log::{debug, error, info, log_enabled, trace, warn, Level};
use log::{debug, info, log_enabled, trace, warn, Level};
use rand::seq::SliceRandom as _;
use std::io::Cursor;
use std::sync::RwLock;
Expand Down Expand Up @@ -259,7 +259,7 @@ impl FilterProtocol {
.build();
if let Err(err) = nc.send_message_to(peer, message.as_bytes()) {
let error_message = format!("nc.send_message GetBlockFilters, error: {:?}", err);
error!("{}", error_message);
info!("{}", error_message);
}
}

Expand All @@ -282,7 +282,7 @@ impl FilterProtocol {
.build();
if let Err(err) = nc.send_message_to(peer, message.as_bytes()) {
let error_message = format!("nc.send_message GetBlockFilterHashes, error: {:?}", err);
error!("{}", error_message);
info!("{}", error_message);
}
}

Expand All @@ -308,7 +308,7 @@ impl FilterProtocol {
"nc.send_message GetBlockFilterCheckPoints, error: {:?}",
err
);
error!("{}", error_message);
info!("{}", error_message);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/protocols/light_client/components/send_blocks_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use ckb_types::{
prelude::*,
utilities::merkle_mountain_range::VerifiableHeader,
};
use log::{debug, error};
use log::{debug, error, info};
use rand::seq::SliceRandom;

use crate::storage::HeaderWithExtension;
Expand Down Expand Up @@ -207,7 +207,7 @@ impl<'a> SendBlocksProofProcess<'a> {
) {
let error_message =
format!("nc.send_message SyncMessage, error: {:?}", err);
error!("{}", error_message);
info!("{}", error_message);
return StatusCode::Network.with_context(error_message);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/protocols/light_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ impl LightClientProtocol {
) {
let error_message =
format!("nc.send_message LightClientMessage, error: {:?}", err);
error!("{}", error_message);
info!("{}", error_message);
}
self.peers.fetching_idle_headers(block_hashes, now);
}
Expand Down Expand Up @@ -788,7 +788,7 @@ impl LightClientProtocol {
) {
let error_message =
format!("nc.send_message LightClientMessage, error: {:?}", err);
error!("{}", error_message);
info!("{}", error_message);
}
self.peers.fetching_idle_txs(tx_hashes, now);
} else {
Expand Down
6 changes: 3 additions & 3 deletions src/utils/network.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::protocols::{Peers, GET_BLOCKS_PROOF_LIMIT};
use ckb_network::{CKBProtocolContext, SupportProtocols};
use ckb_types::{packed, prelude::*, H256};
use log::{debug, error};
use log::{debug, info};
use rand::seq::SliceRandom;
use std::collections::HashMap;
use std::sync::Arc;
Expand Down Expand Up @@ -53,7 +53,7 @@ pub(crate) fn prove_or_download_matched_blocks(
) {
let error_message =
format!("nc.send_message LightClientMessage, error: {:?}", err);
error!("{}", error_message);
info!("{}", error_message);
}
} else {
break;
Expand Down Expand Up @@ -97,7 +97,7 @@ pub(crate) fn prove_or_download_matched_blocks(
nc.send_message(SupportProtocols::Sync.protocol_id(), *peer_index, message)
{
let error_message = format!("nc.send_message SyncMessage, error: {:?}", err);
error!("{}", error_message);
info!("{}", error_message);
}
} else {
break;
Expand Down
Loading