Improve block difficulty logging (#2254)

This commit is contained in:
hashmap 2018-12-29 18:23:06 +01:00 committed by Ignotus Peverell
parent 9bf2c7fb5e
commit c332c2c7e9

View file

@ -129,12 +129,11 @@ fn build_block(
b.header.pow.secondary_scaling = difficulty.secondary_scaling; b.header.pow.secondary_scaling = difficulty.secondary_scaling;
b.header.timestamp = DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(now_sec, 0), Utc); b.header.timestamp = DateTime::<Utc>::from_utc(NaiveDateTime::from_timestamp(now_sec, 0), Utc);
let b_difficulty = (b.header.total_difficulty() - head.total_difficulty()).to_num();
debug!( debug!(
"Built new block with {} inputs and {} outputs, network difficulty: {}, cumulative difficulty {}", "Built new block with {} inputs and {} outputs, block difficulty: {}, cumulative difficulty {}",
b.inputs().len(), b.inputs().len(),
b.outputs().len(), b.outputs().len(),
b_difficulty, difficulty.difficulty,
b.header.total_difficulty().to_num(), b.header.total_difficulty().to_num(),
); );