Merge pull request #1764 from ethcore/log-tweak

Log tweak
This commit is contained in:
Tomasz Drwięga
2016-07-29 12:39:19 +02:00
committed by GitHub
5 changed files with 31 additions and 11 deletions

View File

@@ -570,9 +570,9 @@ impl BlockChain {
if let BlockLocation::BranchBecomingCanonChain(ref d) = info.location {
info!(target: "reorg", "Reorg to {} ({} {} {})",
Colour::Yellow.bold().paint(format!("#{} {}", info.number, info.hash)),
Colour::Red.paint(d.retracted.iter().fold(String::new(), |acc, h| format!("{} {}", acc, h))),
Colour::White.paint(format!("#{} {}", d.ancestor, self.block_details(&d.ancestor).expect("`ancestor` is in the route; qed").number)),
Colour::Green.paint(d.enacted.iter().fold(String::new(), |acc, h| format!("{} {}", acc, h)))
Colour::Red.paint(d.retracted.iter().join(" ")),
Colour::White.paint(format!("#{} {}", self.block_details(&d.ancestor).expect("`ancestor` is in the route; qed").number, d.ancestor)),
Colour::Green.paint(d.enacted.iter().join(" "))
);
}