Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Do not drop the peer with None difficulty (#10772)
Browse files Browse the repository at this point in the history
* Treat peer with None difficulty as legit

* Temporarily enable release binary build - REMOVE BEFORE MERGE
  • Loading branch information
grbIzl authored and ordian committed Jun 27, 2019
1 parent a729ca3 commit 59f0eb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Expand Up @@ -153,7 +153,7 @@ build-android:

build-linux:
<<: *build-on-linux
only: *releaseable_branches
# only: *releaseable_branches

build-linux-i386:
<<: *build-on-linux
Expand Down
2 changes: 1 addition & 1 deletion ethcore/sync/src/chain/mod.rs
Expand Up @@ -994,7 +994,7 @@ impl ChainSync {
}

// Only ask for old blocks if the peer has an equal or higher difficulty
let equal_or_higher_difficulty = peer_difficulty.map_or(false, |pd| pd >= syncing_difficulty);
let equal_or_higher_difficulty = peer_difficulty.map_or(true, |pd| pd >= syncing_difficulty);

if force || equal_or_higher_difficulty {
if let Some(request) = self.old_blocks.as_mut().and_then(|d| d.request_blocks(peer_id, io, num_active_peers)) {
Expand Down

0 comments on commit 59f0eb7

Please sign in to comment.