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

rust-bitcoin / rust-bitcoin / 14251106981

03 Apr 2025 07:23PM UTC coverage: 83.653% (+0.009%) from 83.644%
14251106981

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#4302: Add push_relative_lock_time() and deprecate push_sequence()

<a class=hub.com/rust-bitcoin/rust-bitcoin/commit/<a class="double-link" href="https://git"><a class=hub.com/rust-bitcoin/rust-bitcoin/commit/ebaf162a962494329c6cb5f6d375a6a4a97fe83b">ebaf162a9 Add push_relative_lock_time() and deprecate push_sequence() (Erick Cestari)

Pull request description:

  This pr improves the script builder API to better align with Bitcoin semantics when working with relative timelocks:

  - Add `push_relative_lock_time()` method that takes a `relative::LockTime` parameter, which correctly represents the semantic meaning when working with CHECKSEQUENCEVERIFY

  - Deprecate `push_sequence()` in favor of `push_relative_lock_time()` to avoid confusion between sequence numbers and relative timelocks

  This addresses a potential confusion point in the API where developers might incorrectly push raw sequence numbers in scripts when what they actually need is to push a relative locktime value that will be checked against the transaction's sequence numbers by CHECKSEQUENCEVERIFY.

  Closes #4301

ACKs for top commit:
  apoelstra:
    ACK ebaf162a962494329c6cb5f6d375a6a4a97fe83b; successfully ran local tests
  tcharding:
    ACK ebaf162a962494329c6cb5f6d375a6a4a97fe83b

Tree-SHA512: 52c37b6e813f91590676978c9bab257d81f

0 of 3 new or added lines in 1 file covered. (0.0%)

1 existing line in 1 file now uncovered.

22240 of 26586 relevant lines covered (83.65%)

16782.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

74.58
/bitcoin/src/blockdata/script/builder.rs


Source Not Available

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