rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra 499f36f972
Merge rust-bitcoin/rust-bitcoin#2337: Add check to max difficulty transition threshold
fd6fedc3ad Improve API for max target threshold calculation (Tobin C. Harding)
6e47d57744 Rename difficulty transition threshold functions (Tobin C. Harding)
4121c9a09f Rename Params::pow_limit to max_attainable_target (Tobin C. Harding)
f0f6d3f162 Take Params instead of Network in difficulty function (Tobin C. Harding)
104dee9376 Debug assert that target != zero in difficulty calc (Tobin C. Harding)
c1ba496a07 Document current behaviour of difficulty_float (Tobin C. Harding)
3d01146374 Allow needless-borrows-for-generic-args (Tobin C. Harding)
2a6821b426 Use link to CompactTarget in rustdoc (Tobin C. Harding)

Pull request description:

  When computing the maximum difficulty transition threshold we forgot to check that the returned `Target` is not bigger than the maximum. This value is network specific so keep the original logic but with `_unchecked` on the function name.

  This was noted in the discussion on #2161

ACKs for top commit:
  apoelstra:
    ACK fd6fedc3ad
  sanket1729:
    ACK fd6fedc3ad

Tree-SHA512: 520ee2a07edb251c84b5ce8b48ed6e5a5c1945126dc7bcdb5570e97101ec4a3dc63fa7992725194869e22b21ee4f5955579d5e2499fcb48167637fd1fb3ae74d
2024-04-02 13:18:29 +00:00
..
contrib ci: delete *test.sh files 2024-02-28 20:45:56 +00:00
embedded base58: Re-name crate to base58ck 2024-03-19 09:00:46 +11:00
examples 2024-03-31 automated rustfmt nightly 2024-03-31 01:03:18 +00:00
src Merge rust-bitcoin/rust-bitcoin#2337: Add check to max difficulty transition threshold 2024-04-02 13:18:29 +00:00
tests 2024-03-31 automated rustfmt nightly 2024-03-31 01:03:18 +00:00
CHANGELOG.md Remove no-std feature 2023-12-06 09:54:33 +11:00
Cargo.toml internals: Bump version to 0.3.0 2024-03-27 09:44:30 +11:00
build.rs Bump MSRV to Rust version 1.56.1 2023-11-23 06:20:02 +11:00