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

Removing panickers from sync module #2551

Merged
merged 1 commit into from
Oct 10, 2016
Merged

Removing panickers from sync module #2551

merged 1 commit into from
Oct 10, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Oct 9, 2016

No description provided.

@arkpar arkpar added A0-pleasereview 🤓 Pull request needs code review. M4-core ⛓ Core client code / Rust. labels Oct 9, 2016
trace!(target: "sync", "Sending NewHashes to {:?}", peers);
let mut sent = 0;
let last_parent = HeaderView::new(&io.chain().block_header(BlockID::Hash(chain_info.best_block_hash.clone())).unwrap()).parent_hash();
for &(peer_id, peer_number) in peers {
let peer_best = if chain_info.best_block_number - peer_number > MAX_PEER_LAG_PROPAGATION as BlockNumber {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This check does not really work since there's no reliable way to check peer's best block. I'm going to add a hashset of recently sent blocks/hashes per peer in a future PR instead.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 86.389% when pulling 06775b2 on sync-unwrap into 271bcf4 on master.

@arkpar arkpar changed the title Removing unwarps from sync module Removing panickers from sync module Oct 10, 2016
@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Oct 10, 2016
@gavofyork gavofyork merged commit ae6c965 into master Oct 10, 2016
@gavofyork gavofyork deleted the sync-unwrap branch October 10, 2016 15:43
arkpar added a commit that referenced this pull request Oct 11, 2016
arkpar added a commit that referenced this pull request Oct 11, 2016
* v1.3.6

* Print backtrace on panic (#2535)

* Don't activate peers on connect; Test (#2537)

* Removing unwarps from sync module (#2551)

* Remove unwrap from client module (#2554)

* remove unwraps in client

* imporve block hash expect message

* mining perf trace

* Fixed race condition in trace import (#2555)
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.

4 participants