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

Sync: Update highest block for progress reporting #1411

Merged
merged 1 commit into from
Jun 24, 2016
Merged

Sync: Update highest block for progress reporting #1411

merged 1 commit into from
Jun 24, 2016

Conversation

arkpar
Copy link
Collaborator

@arkpar arkpar commented Jun 23, 2016

Update highest block on NewHash/NewBlock
When syncing with an UI highest block would be determined correctly on a new block

@arkpar arkpar added the A0-pleasereview 🤓 Pull request needs code review. label Jun 23, 2016
@@ -534,6 +534,9 @@ impl ChainSync {
let h = header_rlp.as_raw().sha3();
trace!(target: "sync", "{} -> NewBlock ({})", peer_id, h);
let header: BlockHeader = try!(header_rlp.as_val());
if header.number() > self.highest_block.unwrap_or(0) {
self.highest_block = Some(header.number());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

self.highest_block is used for progress reporting only

@rphmeier
Copy link
Contributor

Have you tested this with eth_isSyncing?

@arkpar
Copy link
Collaborator Author

arkpar commented Jun 24, 2016

Sure, highest block is now reported properly.

@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 24, 2016
@NikVolf NikVolf merged commit 54fc5a5 into master Jun 24, 2016
@arkpar arkpar deleted the sync branch June 24, 2016 11:04
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants