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: fix indexer unit test #20506

Merged
merged 1 commit into from
Jan 20, 2020
Merged

Conversation

rjl493456442
Copy link
Member

@rjl493456442 rjl493456442 commented Jan 6, 2020

This PR fixes unit tests of chain indexers.

In #19748 we fix an issue in chain indexer when it tries to run reorg. The change is the given head in newHead function is the common ancestor of new head header and previous head header. So head is still considered valid. The change merged is using known := (head + 1) / c.sectionSize to calculate the section index which need to be reverted instead of using head/c.sectionSize.

But we don't change the unit test, this PR just follow the original merged change.

Fixes #20497

@rjl493456442 rjl493456442 added this to the 1.9.10 milestone Jan 7, 2020
@fjl fjl self-requested a review January 16, 2020 14:08
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM

@karalabe karalabe merged commit b88b463 into ethereum:master Jan 20, 2020
kjx98 pushed a commit to kjx98/go-ethereum that referenced this pull request Jan 23, 2020
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
tony-ricciardi pushed a commit to tony-ricciardi/go-ethereum that referenced this pull request Jan 20, 2022
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.

chain_indexer_test failed
2 participants