mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-01 05:41:03 +00:00
Additional logging for polkadot network protocols (#2684)
* Additional logging for polkadot network protocols * Additional log * Update node/network/bitfield-distribution/src/lib.rs Co-authored-by: Robert Habermeier <rphmeier@gmail.com> * Update node/network/availability-distribution/src/responder.rs * Added additional chunk info * Added additional peer info Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
@@ -74,6 +74,15 @@ where
|
||||
|
||||
let result = chunk.is_some();
|
||||
|
||||
tracing::trace!(
|
||||
target: LOG_TARGET,
|
||||
hash = ?req.payload.candidate_hash,
|
||||
index = ?req.payload.index,
|
||||
peer = ?req.peer,
|
||||
has_data = ?chunk.is_some(),
|
||||
"Serving chunk",
|
||||
);
|
||||
|
||||
let response = match chunk {
|
||||
None => v1::AvailabilityFetchingResponse::NoSuchChunk,
|
||||
Some(chunk) => v1::AvailabilityFetchingResponse::Chunk(chunk.into()),
|
||||
@@ -99,5 +108,14 @@ where
|
||||
))
|
||||
.await;
|
||||
|
||||
rx.await.map_err(|e| Error::QueryChunkResponseChannel(e))
|
||||
rx.await.map_err(|e| {
|
||||
tracing::trace!(
|
||||
target: LOG_TARGET,
|
||||
?validator_index,
|
||||
?candidate_hash,
|
||||
error = ?e,
|
||||
"Error retrieving chunk",
|
||||
);
|
||||
Error::QueryChunkResponseChannel(e)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user