Skip to content

Feature: Add difficulty_float method for block::Header.#1720

Merged
apoelstra merged 1 commit intorust-bitcoin:masterfrom
junderw:junderw/add-blockheader-difficultyf64
Mar 21, 2023
Merged

Feature: Add difficulty_float method for block::Header.#1720
apoelstra merged 1 commit intorust-bitcoin:masterfrom
junderw:junderw/add-blockheader-difficultyf64

Conversation

@junderw
Copy link
Copy Markdown
Contributor

@junderw junderw commented Mar 21, 2023

Header had a passthrough method for difficulty so I added one for difficulty_float as well.

@junderw junderw mentioned this pull request Mar 21, 2023
8 tasks
@apoelstra
Copy link
Copy Markdown
Member

I am a tiny bit uncomfortable using assert_eq on a floating point value. But since we are directly constructing these floats out of the IEEE 754 bits, I think it's good.

Copy link
Copy Markdown
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 05fdead

Copy link
Copy Markdown
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

ACK 05fdead. Don't mind the floating point comparison as it is in tests.

Copy link
Copy Markdown
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

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

ACK 05fdead

Copy link
Copy Markdown
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

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

ACK 05fdead

@tcharding
Copy link
Copy Markdown
Member

This PR has been added to the changelog for release 0.30.0

@apoelstra
Copy link
Copy Markdown
Member

Ok, cool, I'll merge it and #1721 before the release.

@apoelstra apoelstra merged commit 7b4ed3f into rust-bitcoin:master Mar 21, 2023
apoelstra added a commit that referenced this pull request Mar 22, 2023
ffee8ad Bump version to v0.30.0 (Tobin C. Harding)

Pull request description:

  Add changelog notes and bump the version number to v0.30.0.

  ## TODO - pre-merge

  - [x] Release `bitcoin_hashes` 0.12: #1694
  - [x] Release secp 0.27: rust-bitcoin/rust-secp256k1#588
    - rust-bitcoin/rust-secp256k1#590
  - [x] Update `secp256k1` dependency to use newly released v0.27: #1714
  - [x] Merge
    - ~#1696
    - #1695
    -  #1111
  - [x] If time permits merge these:
    - #1710
    - #1705
    - #1713
  - [x] Set the release date in changelog header
  - [x] And merge these:
    - #1721
    - #1720
    - #1719
    - #1717

  ## TODO  - post release
  - [ ] Release the blogpost: rust-bitcoin/www.rust-bitcoin.org#2
     - ~Set the date in the blog post to match the date 0.30 is released~

ACKs for top commit:
  sanket1729:
    reACK ffee8ad
  Kixunil:
    ACK ffee8ad
  apoelstra:
    ACK ffee8ad

Tree-SHA512: b0ea113ee1726fd9b263d0e01fe14bd544c007c05a9ac43b6c2d4edbeef3bb3ad456b061ef086626e1e1b27a0cda49cb6bc28aac3ad1691d72ffe00400ed5b45
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.

5 participants