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

Log changes for block relay #1748

Merged
merged 1 commit into from
Aug 3, 2023
Merged
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
14 changes: 7 additions & 7 deletions crates/sc-subspace-block-relay/src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use sp_runtime::Justifications;
use std::num::NonZeroUsize;
use std::sync::Arc;
use std::time::{Duration, Instant};
use tracing::{info, trace, warn};
use tracing::{debug, info, trace, warn};

type BlockHash<Block> = <Block as BlockT>::Hash;
type BlockHeader<Block> = <Block as BlockT>::Header;
Expand Down Expand Up @@ -226,7 +226,7 @@ where
who: PeerId,
request: BlockRequest<Block>,
) -> Result<Result<Vec<u8>, RequestFailure>, oneshot::Canceled> {
let ret = self.download(who, request).await;
let ret = self.download(who, request.clone()).await;
match ret {
Ok(result) => {
let downloaded = result.downloaded.encode();
Expand All @@ -241,9 +241,9 @@ where
Ok(Ok(downloaded))
}
Err(error) => {
trace!(
debug!(
target: LOG_TARGET,
"relay::download_block: peer = {who:?}, err = {error:?}"
"relay::download_block: error: {who:?}/{request:?}/{error:?}"
);
match error {
RelayError::RequestResponse(error) => match error {
Expand Down Expand Up @@ -332,10 +332,10 @@ where
"relay::consensus server: request processed from: {peer}"
);
}
Err(err) => {
trace!(
Err(error) => {
debug!(
target: LOG_TARGET,
"relay::consensus server: request processing error: {peer}: {err:?}"
"relay::consensus server: error: {peer}/{error:?}"
);
}
}
Expand Down
Loading