• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-bitcoin / rust-bitcoin / 11038857378
83%

Build:
DEFAULT BRANCH: master
Ran 25 Sep 2024 06:23PM UTC
Jobs 1
Files 99
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Sep 2024 06:21PM UTC coverage: 82.831% (-0.02%) from 82.849%
11038857378

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#3392: fix: script number overflow check for push_int

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/33edaf935d71167bb1bb92bc671272217852005a">33edaf935<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/3bbad771723ce80848fd0f79d5476822850b4ec8"> fix: check overflow for push_int with push_int_unchecked (Chris Hyunhum Cho)
<a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/876146154b4e480d85196461ee36cf3e8734d2b4">876146154</a> 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 33edaf935d71167bb1bb92bc671272217852005a

Tree-SHA512: 89b02bd3facd553d07cfe4653050045fa07

19 of 26 new or added lines in 4 files covered. (73.08%)

18999 of 22937 relevant lines covered (82.83%)

18211.41 hits per line

Jobs
ID Job ID Ran Files Coverage
1 11038857378.1 25 Sep 2024 06:23PM UTC 0
82.83
GitHub Action Run
Source Files on build 11038857378
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #11038857378
  • 3bbad771 on github
  • Prev Build on master (#11038097026)
  • Next Build on master (#11042783497)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc