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

core, eth, les: fix messy code #15367

Merged
merged 3 commits into from
Oct 25, 2017
Merged

Conversation

karalabe
Copy link
Member

No description provided.

@karalabe karalabe added this to the 1.7.3 milestone Oct 24, 2017
@karalabe karalabe requested a review from zsfelfoldi October 24, 2017 16:47
Copy link
Contributor

@zsfelfoldi zsfelfoldi left a comment

Choose a reason for hiding this comment

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

Don't break the chain indexer logic; otherwise LGTM :)

if h := FindCommonAncestor(c.chainDb, prevHeader, header); h != nil {
c.newHead(h.Number.Uint64(), true)
}
c.newHead(FindCommonAncestor(c.chainDb, prevHeader, header).Number.Uint64(), true)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not correct, it will panic after light client checkpoint syncing. I think that is the only case where you don't have a common ancestor in the header chain. We can think about a nicer workaround for this corner case but this one will definitely break it.

@karalabe karalabe merged commit 0095531 into ethereum:master Oct 25, 2017
vincentserpoul pushed a commit to vincentserpoul/go-ethereum that referenced this pull request Nov 22, 2017
* core, eth, les: fix messy code

* les: fixed tx status test and rlp encoding

* core: add a workaround for light sync
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