Skip to content

Commit c1c5446

Browse files
committed
Replace make_tenure_bitvector debug logs with trace level logs
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent 7224b9b commit c1c5446

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

stackslib/src/net/inv/nakamoto.rs

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -407,16 +407,13 @@ impl InvGenerator {
407407
let cur_sortition_info = self.get_sortition_info(sortdb, &cur_consensus_hash)?;
408408
let parent_sortition_consensus_hash = cur_sortition_info.parent_consensus_hash;
409409

410-
debug!("Get sortition and tenure info for height {}. cur_consensus_hash = {}, cur_tenure_info = {:?}, parent_sortition_consensus_hash = {}", cur_height, &cur_consensus_hash, &cur_tenure_opt, &parent_sortition_consensus_hash);
410+
trace!("Get sortition and tenure info for height {cur_height}. cur_consensus_hash = {cur_consensus_hash}, cur_tenure_info = {cur_tenure_opt:?}, parent_sortition_consensus_hash = {parent_sortition_consensus_hash}");
411411

412412
if let Some(cur_tenure_info) = cur_tenure_opt.as_ref() {
413413
// a tenure was active when this sortition happened...
414414
if cur_tenure_info.tenure_id_consensus_hash == cur_consensus_hash {
415415
// ...and this tenure started in this sortition
416-
debug!(
417-
"Tenure was started for {} (height {})",
418-
cur_consensus_hash, cur_height
419-
);
416+
trace!("Tenure was started for {cur_consensus_hash} (height {cur_height})");
420417
tenure_status.push(true);
421418
cur_tenure_opt = self.get_processed_tenure(
422419
chainstate,
@@ -426,19 +423,13 @@ impl InvGenerator {
426423
)?;
427424
} else {
428425
// ...but this tenure did not start in this sortition
429-
debug!(
430-
"Tenure was NOT started for {} (bit {})",
431-
cur_consensus_hash, cur_height
432-
);
426+
trace!("Tenure was NOT started for {cur_consensus_hash} (bit {cur_height})");
433427
tenure_status.push(false);
434428
}
435429
} else {
436430
// no active tenure during this sortition. Check the parent sortition to see if a
437431
// tenure begain there.
438-
debug!(
439-
"No winning sortition for {} (bit {})",
440-
cur_consensus_hash, cur_height
441-
);
432+
trace!("No winning sortition for {cur_consensus_hash} (bit {cur_height})");
442433
tenure_status.push(false);
443434
cur_tenure_opt = self.get_processed_tenure(
444435
chainstate,
@@ -457,9 +448,9 @@ impl InvGenerator {
457448
}
458449

459450
tenure_status.reverse();
460-
debug!(
461-
"Tenure bits off of {} and {}: {:?}",
462-
nakamoto_tip, &tip.consensus_hash, &tenure_status
451+
trace!(
452+
"Tenure bits off of {nakamoto_tip} and {}: {tenure_status:?}",
453+
&tip.consensus_hash
463454
);
464455
Ok(tenure_status)
465456
}

0 commit comments

Comments
 (0)