Skip to content

Commit 79e79d3

Browse files
majectymergify[bot]
authored andcommitted
Do not print log if a peer's new total_score is same with the previous
1 parent ed3b9f3 commit 79e79d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sync/src/block/downloader/header.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ impl HeaderDownloader {
7474
}
7575

7676
pub fn update(&mut self, total_score: U256, best_hash: H256) -> bool {
77-
if self.total_score < total_score {
77+
if self.total_score == total_score {
78+
true
79+
} else if self.total_score < total_score {
7880
self.total_score = total_score;
7981
self.best_hash = best_hash;
8082

0 commit comments

Comments
 (0)