Tweak format of log so it's not so verbose. (#1758)
This commit is contained in:
parent
297d25dd65
commit
0934a283b2
@ -519,10 +519,12 @@ impl BlockChain {
|
|||||||
let info = self.block_info(bytes);
|
let info = self.block_info(bytes);
|
||||||
|
|
||||||
if let BlockLocation::BranchBecomingCanonChain(ref d) = info.location {
|
if let BlockLocation::BranchBecomingCanonChain(ref d) = info.location {
|
||||||
info!(target: "reorg", "{} Using {} (#{})", Colour::Yellow.bold().paint("Switching fork to a new branch."), info.hash, info.number);
|
info!(target: "reorg", "Reorg to {} ({} {} {})",
|
||||||
info!(target: "reorg", "{}{}", Colour::Red.bold().paint("Retracting"), d.retracted.iter().fold(String::new(), |acc, h| format!("{} {}", acc, h)));
|
Colour::Yellow.bold().paint(format!("#{} {}", info.number, info.hash)),
|
||||||
info!(target: "reorg", "{} {} (#{})", Colour::Blue.bold().paint("Leaving"), d.ancestor, self.block_details(&d.ancestor).expect("`ancestor` is in the route; qed").number);
|
Colour::Red.paint(d.retracted.iter().fold(String::new(), |acc, h| format!("{} {}", acc, h))),
|
||||||
info!(target: "reorg", "{}{}", Colour::Green.bold().paint("Enacting"), d.enacted.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)))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
self.apply_update(ExtrasUpdate {
|
self.apply_update(ExtrasUpdate {
|
||||||
|
Loading…
Reference in New Issue
Block a user