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 s3krit committed Aug 12, 2019
1 parent c741254 commit d8b0130
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,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 d8b0130

Please sign in to comment.