Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Restart sync if no more peers with snapshots #3007

Merged
merged 1 commit into from
Oct 31, 2016
Merged

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Oct 31, 2016

No description provided.

@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Oct 31, 2016
@@ -1062,6 +1058,11 @@ impl ChainSync {
self.sync_peer(io, p, false);
}
}
if (self.state != SyncState::WaitingPeers && self.state != SyncState::SnapshotWaiting && self.state != SyncState::Waiting && self.state != SyncState::Idle)
&& !self.peers.values().any(|p| p.asking != PeerAsking::Nothing && p.block_set != Some(BlockSet::OldBlocks) && p.can_sync()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes more sense to check if all peers are idle after they have been given new tasks and not before

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Oct 31, 2016
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling aff752b on sync-restart into * on master*.

@gavofyork gavofyork merged commit b7bebdb into master Oct 31, 2016
@gavofyork gavofyork deleted the sync-restart branch October 31, 2016 13:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well. M4-core ⛓ Core client code / Rust.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants