Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncmanager: pick the first candidate then break #39

Closed
wants to merge 1 commit into from

Conversation

detailyang
Copy link
Contributor

Hello.
It looks like we forget to break the loop after picking the first available candidate at syncmanager

@jjz jjz requested a review from ludete September 3, 2018 07:48
@wolfstudy
Copy link
Contributor

please review

if peer.LastBlock() < best.Height {
 	state.syncCandidate = false	
 	continue	 	
}	

if break , next loop the behavior may be different

@wolfstudy wolfstudy closed this Sep 3, 2018
@detailyang
Copy link
Contributor Author

detailyang commented Sep 3, 2018

@wolfstudy thanks for pointing out. you are right and picking the "first" available candidate to mislead me. It should be the "last" :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants