Fixed stalled sync (#2747)

This commit is contained in:
Arkadiy Paronyan 2016-10-20 12:56:37 +02:00 committed by Gav Wood
parent d2e4bafaa5
commit 7db42df1db
1 changed files with 1 additions and 1 deletions

View File

@ -1058,7 +1058,7 @@ impl ChainSync {
}
let have_latest = io.chain().block_status(BlockID::Hash(peer_latest)) != BlockStatus::Unknown;
if !have_latest && (higher_difficulty || force) {
if !have_latest && (higher_difficulty || force || self.state == SyncState::NewBlocks) {
// check if got new blocks to download
if let Some(request) = self.new_blocks.request_blocks(io) {
self.request_blocks(io, peer_id, request, BlockSet::NewBlocks);