Fixed stalled sync (#2747)
This commit is contained in:
parent
d2e4bafaa5
commit
7db42df1db
@ -1058,7 +1058,7 @@ impl ChainSync {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let have_latest = io.chain().block_status(BlockID::Hash(peer_latest)) != BlockStatus::Unknown;
|
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
|
// check if got new blocks to download
|
||||||
if let Some(request) = self.new_blocks.request_blocks(io) {
|
if let Some(request) = self.new_blocks.request_blocks(io) {
|
||||||
self.request_blocks(io, peer_id, request, BlockSet::NewBlocks);
|
self.request_blocks(io, peer_id, request, BlockSet::NewBlocks);
|
||||||
|
Loading…
Reference in New Issue
Block a user