Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

approval-voting: add more logs #4704

Merged
merged 1 commit into from
Jan 12, 2022
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
13 changes: 9 additions & 4 deletions node/core/approval-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1098,8 +1098,9 @@ async fn handle_from_overseer(
Ok(block_imported_candidates) => {
// Schedule wakeups for all imported candidates.
for block_batch in block_imported_candidates {
tracing::trace!(
tracing::debug!(
target: LOG_TARGET,
block_number = ?block_batch.block_number,
block_hash = ?block_batch.block_hash,
num_candidates = block_batch.imported_candidates.len(),
"Imported new block.",
Expand Down Expand Up @@ -1142,6 +1143,7 @@ async fn handle_from_overseer(
actions
},
FromOverseer::Signal(OverseerSignal::BlockFinalized(block_hash, block_number)) => {
tracing::debug!(target: LOG_TARGET, ?block_hash, ?block_number, "Block finalized",);
*last_finalized_height = Some(block_number);

crate::ops::canonicalize(db, block_number, block_hash)
Expand Down Expand Up @@ -1252,14 +1254,17 @@ async fn handle_approved_ancestor(
// entries we can fail.
let entry = match db.load_block_entry(&block_hash)? {
None => {
tracing::trace! {
let block_number = target_number.saturating_sub(i as u32);
tracing::info!(
target: LOG_TARGET,
unknown_number = ?block_number,
unknown_hash = ?block_hash,
"Chain between ({}, {}) and {} not fully known. Forcing vote on {}",
target,
target_number,
lower_bound,
lower_bound,
}
);
return Ok(None)
},
Some(b) => b,
Expand Down Expand Up @@ -1382,7 +1387,7 @@ async fn handle_approved_ancestor(
}
}

tracing::trace!(
tracing::debug!(
target: LOG_TARGET,
"approved blocks {}-[{}]-{}",
target_number,
Expand Down