From 59f0eb7e6b2986e7b9aae65a22ab9e9816a4ff64 Mon Sep 17 00:00:00 2001 From: Anton Gavrilov Date: Thu, 27 Jun 2019 17:45:21 +0200 Subject: [PATCH] Do not drop the peer with None difficulty (#10772) * Treat peer with None difficulty as legit * Temporarily enable release binary build - REMOVE BEFORE MERGE --- .gitlab-ci.yml | 2 +- ethcore/sync/src/chain/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33cfbd9d9fb..1f4b4b8807e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -153,7 +153,7 @@ build-android: build-linux: <<: *build-on-linux - only: *releaseable_branches + # only: *releaseable_branches build-linux-i386: <<: *build-on-linux diff --git a/ethcore/sync/src/chain/mod.rs b/ethcore/sync/src/chain/mod.rs index bde38cda399..0c2b03d1bd0 100644 --- a/ethcore/sync/src/chain/mod.rs +++ b/ethcore/sync/src/chain/mod.rs @@ -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)) {