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

Return BlockHash from BlockHeader::validate_pow #572

Merged

Conversation

jkczyz
Copy link
Contributor

@jkczyz jkczyz commented Feb 18, 2021

Validating a block's proof-of-work involves computing the block hash. Returning it from BlockHeader::validate_pow avoids having callers recompute the block hash if it is needed.

Helpful when validating the chain in lightningdevkit/rust-lightning#791 (comment)

Validating a block's proof-of-work involves computing the block hash.
Returning it from BlockHeader::validate_pow avoids having callers
recompute the block hash if it is needed.
Copy link
Contributor

@darosior darosior left a comment

Choose a reason for hiding this comment

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

utACK ade2bce

@sgeisler sgeisler added the API break This PR requires a version bump for the next release label Feb 18, 2021
Copy link
Contributor

@sgeisler sgeisler left a comment

Choose a reason for hiding this comment

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

tACK ade2bce

@TheBlueMatt
Copy link
Member

Based on current master and two acks. Merging.

@TheBlueMatt TheBlueMatt merged commit c4f339f into rust-bitcoin:master Feb 19, 2021
@dr-orlovsky dr-orlovsky added this to the 0.26.1 milestone May 11, 2021
dunxen added a commit to dunxen/rust-lightning that referenced this pull request Jul 22, 2022
The validate_pow() method now returns the BlockHash since rust-bitcoin
v0.26.2 thanks to jkczyz's PR (rust-bitcoin/rust-bitcoin/pull/572).
dunxen added a commit to dunxen/rust-lightning that referenced this pull request Jul 22, 2022
The `validate_pow()` method now returns the BlockHash since rust-bitcoin
v0.26.2 thanks to jkczyz's PR (rust-bitcoin/rust-bitcoin/pull/572).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API break This PR requires a version bump for the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants