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

multi: Explicit hash in next work diff calcs. #2022

Merged
merged 3 commits into from
Dec 28, 2019

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Dec 26, 2019

This modifies the CalcNextRequiredDifficulty function in blockchain to accept a hash instead of using the current chain tip as part of an overall effort to make the blockchain module more explicit and less reliant on the current state and updates all callers accordingly. It also removes the CalcNextRequiredDiffNode which is no longer needed as a result as well as associated code from blockamanager.

The changes are split into multiple commits to ease the review process.

This modifies the CalcNextRequiredDifficulty function to accept a hash
instead of using the current chain tip as part of an overall effort to
make the blockchain module more explicit and less reliant on the current
state.
This removes the CalcNextRequiredDifficulty and CalcNextRequiredDiffNode
functions, along with their associated message structs, from the block
manager since they are no longer used or needed.
@davecgh davecgh force-pushed the blockchain_explicit_calcnextreqdiff branch from 2b0b963 to e7e9052 Compare December 28, 2019 00:21
@davecgh davecgh merged commit e7e9052 into decred:master Dec 28, 2019
@davecgh davecgh deleted the blockchain_explicit_calcnextreqdiff branch December 28, 2019 00:34
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.

None yet

3 participants