Do not drop the peer with None difficulty (#10772)

* Treat peer with None difficulty as legit

* Temporarily enable release binary build - REMOVE BEFORE MERGE
This commit is contained in:
Anton Gavrilov 2019-06-27 17:45:21 +02:00 committed by Andronik Ordian
parent a729ca3223
commit 59f0eb7e6b
2 changed files with 2 additions and 2 deletions

View File

@ -153,7 +153,7 @@ build-android:
build-linux:
<<: *build-on-linux
only: *releaseable_branches
# only: *releaseable_branches
build-linux-i386:
<<: *build-on-linux

View File

@ -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)) {