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

Feature/del headers #134

Merged
merged 10 commits into from
Nov 2, 2022
Merged

Feature/del headers #134

merged 10 commits into from
Nov 2, 2022

Conversation

lbtsm
Copy link
Collaborator

@lbtsm lbtsm commented Nov 1, 2022

No description provided.

@@ -65,17 +65,39 @@ func headerKey(number uint64, hash common.Hash) string {
return fmt.Sprintf("%d%s%s", number, SplicingSymbol, hash.Hex())
}

func (hs *HeaderStore) headerIdx(number uint64) uint64 {
return uint64(math.Mod(float64(number), MaxHeaderLimit)) + startNumber
Copy link
Contributor

Choose a reason for hiding this comment

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

startNumber can not be initialized when reboot the node.

Copy link
Collaborator Author

@lbtsm lbtsm Nov 1, 2022

Choose a reason for hiding this comment

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

Yes, we have made improvements here. We do not use startNumber,Please check the next commit

@mapdev33 mapdev33 merged commit 70367c5 into mapprotocol:main Nov 2, 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.

3 participants