rust-bitcoin-unsafe-fast/bitcoin
merge-script 3bbad77172
Merge rust-bitcoin/rust-bitcoin#3392: fix: script number overflow check for push_int
33edaf935d fix: check overflow for push_int with push_int_unchecked (Chris Hyunhum Cho)
876146154b refactor: use push_lock_time instead of push_int (Chris Hyunhum Cho)

Pull request description:

  Fix the issue https://github.com/rust-bitcoin/rust-bitcoin/issues/1530. In the discussion of https://github.com/rust-bitcoin/rust-bitcoin/issues/1530, the suggested solution is to implement `ScriptInt` type to embrace the various type of integer(`i32, u32, i64, u64, i128, u128, isize, usize...`) to support both script number and locktime number.

  However, as `push_locktime` and `push_sequence` implemented, there’s no need to support `u32` of lock time for `push_int` anymore. Therefore, I’ve just changed the type of parameter to `i32`, and only check if it’s `i32::MIN`(which overflows 4 bytes sign-magnitude integer).

  ~I also added push_uint method to use internally for `push_locktime` and `push_sequence`, which have a dependency on `push_int` method.~

  UPDATE: also add `push_int_unchecked` for those who want to push the integer out of range(and helper for `push_locktime` and `push_sequence`, which has the same functionality of former `push_int`.

ACKs for top commit:
  tcharding:
    ACK 33edaf935d

Tree-SHA512: 89b02bd3faf1e0a1ed530b7210250f0db33886d2acd553d07761f4aef0bb6388b22ddc06a88de05acfe465305db4cf34822fb6547576aae2aa224b4d0045fa07
2024-09-25 18:21:34 +00:00
..
contrib Add Arbitrary dependency 2024-08-23 15:39:20 -05:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples refactor: use push_lock_time instead of push_int 2024-09-25 03:07:20 +00:00
src Merge rust-bitcoin/rust-bitcoin#3392: fix: script number overflow check for push_int 2024-09-25 18:21:34 +00:00
tests Refactor GetKey to take the KeyRequest by reference 2024-09-13 14:49:54 +03:00
CHANGELOG.md Capitalize Merkle 2024-07-01 17:42:43 +01:00
Cargo.toml Merge rust-bitcoin/rust-bitcoin#3375: Release tracking PR: `bitcoin-internals 0.4.0` 2024-09-23 18:32:23 +00:00