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

Recovers header if hash is not found in DB on startup #1180

Merged
merged 1 commit into from
Oct 13, 2023

Conversation

robschleusner
Copy link
Contributor

@dominant-strategies/core-dev

core/headerchain.go Outdated Show resolved Hide resolved
wizeguyy
wizeguyy previously approved these changes Oct 3, 2023
core/headerchain.go Outdated Show resolved Hide resolved
@wizeguyy wizeguyy dismissed their stale review October 3, 2023 15:06

see new comments

core/headerchain.go Outdated Show resolved Hide resolved
Copy link
Contributor

@Djadih Djadih left a comment

Choose a reason for hiding this comment

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

Agree on the warn. And changed requirement to recover the hash for the current header so it should be bubbled up one level in the nested if.

@robschleusner robschleusner force-pushed the main branch 2 times, most recently from c94e9da to ec076a7 Compare October 3, 2023 15:32
core/headerchain.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gameofpointers gameofpointers left a comment

Choose a reason for hiding this comment

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

Has anyone tested this? otherwise I will.

core/headerchain.go Outdated Show resolved Hide resolved
Copy link
Contributor

@gameofpointers gameofpointers left a comment

Choose a reason for hiding this comment

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

Have a suggestion, and can you tell me how you tested this code ?

@robschleusner
Copy link
Contributor Author

Tested it by adding a bad hash to rawDb in the Stop() function.

@gameofpointers gameofpointers self-requested a review October 13, 2023 03:54
@robschleusner robschleusner merged commit 479ad41 into dominant-strategies:main Oct 13, 2023
1 check passed
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.

4 participants