diff --git a/core/src/core/target.rs b/core/src/core/target.rs index 0d6159604..40bb0e6e7 100644 --- a/core/src/core/target.rs +++ b/core/src/core/target.rs @@ -68,6 +68,12 @@ impl Difficulty { } } +impl fmt::Display for Difficulty { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}", self.num) + } +} + impl Add for Difficulty { type Output = Difficulty; fn add(self, other: Difficulty) -> Difficulty { diff --git a/grin/src/miner.rs b/grin/src/miner.rs index a23e30f4b..3c27b65de 100644 --- a/grin/src/miner.rs +++ b/grin/src/miner.rs @@ -74,9 +74,10 @@ impl Miner { // transactions) and as long as the head hasn't changed let deadline = time::get_time().sec + 2; let mut sol = None; - debug!("Mining at Cuckoo{} for at most 2 secs on block {}.", + debug!("Mining at Cuckoo{} for at most 2 secs on block {} at difficulty {}.", b.header.cuckoo_len, - latest_hash); + latest_hash, + b.header.difficulty); let mut iter_count = 0; while head.hash() == latest_hash && time::get_time().sec < deadline { let pow_hash = b.hash();