rust-bitcoin-unsafe-fast/bitcoin/src/blockdata
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
..
locktime Merge rust-bitcoin/rust-bitcoin#2581: Implement ArbitraryOrd for relative::LockTime 2024-04-02 00:36:12 +00:00
script 2024-03-31 automated rustfmt nightly 2024-03-31 01:03:18 +00:00
block.rs Take Params instead of Network in difficulty function 2024-04-02 11:41:34 +11:00
constants.rs Move unit types to units 2024-03-12 11:59:39 +11:00
mod.rs Move unit types to units 2024-03-12 11:59:39 +11:00
opcodes.rs Fix new nightly warnings/errors 2024-02-21 14:13:49 +11:00
transaction.rs 2024-03-31 automated rustfmt nightly 2024-03-31 01:03:18 +00:00
witness.rs 2024-03-31 automated rustfmt nightly 2024-03-31 01:03:18 +00:00