Commit Graph

6603 Commits

Author SHA1 Message Date
merge-script 8ca3a430c7
Merge rust-bitcoin/rust-bitcoin#4336: units: Make minor improvements to `MathOp`
0f62c9a582 units: Make minor improvements to MathOp (Tobin C. Harding)

Pull request description:

  Follow up from #4312, improve the `MathOp` type by:

  - Do not provide public constructor
  - Add cast protection

ACKs for top commit:
  apoelstra:
    ACK 0f62c9a5822a813be5c6f6b19d160458243f174a; successfully ran local tests
  Kixunil:
    ACK 0f62c9a582

Tree-SHA512: dbb06c5afd8df5364a2aec12b7c8632620a1e8f3955b83e91a9b4f5c2e0daaa1ecdb050d8e395e95bf018d718847cddbf3338bd89f70cbb0382bf5e080d5cf21
2025-04-20 16:35:47 +00:00
aagbotemi e0b627ea81
deserialize witness from a list of hex strings
- ci(primitives): enable hex feature in CI build
- from_hex() implemented more efficiently
2025-04-20 15:53:52 +01:00
Fmt Bot 2c1ce53deb 2025-04-20 automated rustfmt nightly 2025-04-20 01:36:29 +00:00
Salvatore Ingala 418445f26b
Allow using the 'base64' feature in no_std environments 2025-04-19 19:31:11 +02:00
aagbotemi 73317c1c31
rename try_into_taptree into try_into_tap_tree
- docs(taproot): hide deprecated try_into_taptree
2025-04-19 16:54:01 +01:00
aagbotemi 87d1210156
accessing XOnlyPublicKey from bitcoin::taproot 2025-04-19 16:26:19 +01:00
ChrisCho-H 2b37583ca5 test: add test for push slice minimal
Test push_slice and push_slice_nom_minimal from OP_1...OP_16 and OP_1NEGATE
2025-04-19 14:23:31 +09:00
merge-script c85648cfd4
Merge rust-bitcoin/rust-bitcoin#4322: fix: enforce standard minimal push for push_slice
354e1e42ad fix: enforce minimal push for push_slice (ChrisCho-H)

Pull request description:

  Currently `push_slice` doesn't check the standard minimal push rule, which could result in possible money loss(e.g. if non minimal push is used in output script of p2wsh or p2tr).
  Introduce `push_slice_non_minimal` to provide the way to push as now, and change `push_slice` logic to follow standard minimal push rule.

  99a4ddf5ab/src/script/script.cpp (L366)

ACKs for top commit:
  tcharding:
    ACK 354e1e42ad
  apoelstra:
    ACK 354e1e42ad98c7968827d03be563bc14d764a983; successfully ran local tests

Tree-SHA512: 01f53dbd2a1a3c9a9e4387f0aaa7801f9c4570996054503a38d09ed1646ab65a3249d227adcf4139ac37a111d795e6cf986c4c273d5660c20820d1b36ba46f57
2025-04-18 14:23:53 +00:00
merge-script 89d7b3fe24
Merge rust-bitcoin/rust-bitcoin#4358: Capitalize Taproot in rustdocs
c4ff2baa5a Capitalize Taproot in rustdocs (Jamil Lambert)

Pull request description:

  Some recent additions to the rustdocs used a lowercase t in taproot.

  Capitalize all cases of Taproot in rustdocs to be consistent.

  Closes #4354

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

Tree-SHA512: 620ccf769a6dad3bcdfec8a0460f6f1bbf90780e280ca94317f6048117aaad06c41a90cd3ee00d670f799459316c1f84e96e4ce3ef3a44818243b21c2f41924b
2025-04-18 13:04:17 +00:00
merge-script 9b455ffe83
Merge rust-bitcoin/rust-bitcoin#4359: fix `rejectection` to `rejection` message_network.rs
79f6530c86 fix rejectection to rejection message_network.rs (Alex Pikme)

Pull request description:

ACKs for top commit:
  apoelstra:
    ACK 79f6530c864e06316a80dae0842762352527def3; successfully ran local tests

Tree-SHA512: 0b8875780365496ce9621c0ca8bb7617fd458bb618e0bd93607245a9e326509c2a5817b8a650722a54c24ea3cd673345c63d3b4d2ef01ff074e09d2c0e5b235e
2025-04-18 01:38:55 +00:00
merge-script 6241b34afc
Merge rust-bitcoin/rust-bitcoin#4319: units: Implement privacy boundaries
6323867c65 Run the formatter (Tobin C. Harding)
d5c08aef32 units: Update column width (Tobin C. Harding)
f7f1a0be8c Add privacy boundary to BlockTime (Tobin C. Harding)
b3dfe0df3f Add privacy boundary to Weight (Tobin C. Harding)
e1a14b3c2d Add privacy boundary to FeeRate (Tobin C. Harding)
4b733d4dad Run the formatter (Tobin C. Harding)

Pull request description:

  Add privacy boundary for `FeeRate`, `BlockTime`, and `Weight`. The lock times are a bit curly so just doing these ones for now.

ACKs for top commit:
  apoelstra:
    ACK 6323867c65cdbf0f1b25d252fded6873acd35a3a; successfully ran local tests

Tree-SHA512: b6cf5eb032e055414f48f3469ec1748635b9f53ca64c158bd861d1ae6e2cfbe7b4d82de98f7dc90913d98429e6ae6991a4a61b6c438574fcbef9b3bc7ebafb4b
2025-04-17 22:07:20 +00:00
Alex Pikme 79f6530c86
fix rejectection to rejection message_network.rs 2025-04-17 21:13:12 +02:00
Jamil Lambert c4ff2baa5a
Capitalize Taproot in rustdocs
Some recent additions to the rustdocs used a lowercase t in taproot.

Capitalize all cases of Taproot in rustdocs to be consistent.
2025-04-17 18:02:35 +01:00
merge-script 30c1933d16
Merge rust-bitcoin/rust-bitcoin#4347: primitives: Increase test coverage in `Script`
b4b61cb884 Add tests to increase coverage (Jamil Lambert, PhD)
6bcc6b703d Expand display test to cover debug and OP_0 (Jamil Lambert, PhD)
8a096b77d5 Expand as_ref and as_mut tests (Jamil Lambert, PhD)
afa51f7bfa Add missing empty line, and remove extra one (Jamil Lambert, PhD)

Pull request description:

  Expand existing tests and add new ones to increase the test coverage in `primitives/src/script/` to 100% excluding `serde` and `arbitrary` features.

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

Tree-SHA512: 6c37a194e5a94fe04bb26d4e904bd98efc75bd433b59aa09b1c102df96b753602d3ad6540ed9941827f03c7d38e7bbb8b10bbcc8c6ab52b8f96b83743eec4519
2025-04-17 15:05:33 +00:00
Tobin C. Harding 6323867c65
Run the formatter 2025-04-17 11:43:05 +10:00
Tobin C. Harding d5c08aef32
units: Update column width
Update column width inside the new `encapsulate` modules.

No content change.
2025-04-17 11:43:05 +10:00
Tobin C. Harding f7f1a0be8c
Add privacy boundary to BlockTime
As per policy in #4090 add a privacy boundary to the `BlockTime` type.
Use the module name `encapsulate` as is done in `amount` - its private
so the name can easily be changed later if needed.

Explicitly do not run the formatter or update rustdoc column width so
that review is easier.
2025-04-17 11:43:05 +10:00
Tobin C. Harding b3dfe0df3f
Add privacy boundary to Weight
As per policy in #4090 add a privacy boundary to the `Weight` type. Use
the module name `encapsulate` as is done in `amount` - its private so
the name can easily be changed later if needed.

Explicitly do not run the formatter or update rustdoc column width so
that review is easier.
2025-04-17 11:43:05 +10:00
Tobin C. Harding e1a14b3c2d
Add privacy boundary to FeeRate
As per policy in #4090 add a privacy boundary to the `FeeRate` type. Use
the module name `encapsulate` as is done in `amount` - its private so
the name can easily be changed later if needed.

Explicitly do not run the formatter or update rustdoc column width so
that review is easier.
2025-04-17 11:43:05 +10:00
Tobin C. Harding 4b733d4dad
Run the formatter 2025-04-17 11:43:02 +10:00
merge-script 94abc99fb0
Merge rust-bitcoin/rust-bitcoin#4318: Document the `NumOpResult` type
c30a504ea6 units: Document the NumOpResult type (Tobin C. Harding)

Pull request description:

  Document the `NumOpResult` type.

  Note that this includes two new getters on the `NumOpResult`, API hole found during review of the new docs.

  Fix: #4222

ACKs for top commit:
  apoelstra:
    ACK c30a504ea6a5140bdf5667ea42b76bdfa2457456; successfully ran local tests; nice!

Tree-SHA512: ab8d971b74ff4bb06f5737943740c5c748f6313ce1b82798c7d709f8747779efdffe0aa8ed8620afa449fd0dd502b5a2050729a538c51428215972a4f7b6ebf7
2025-04-17 11:35:03 +10:00
ChrisCho-H 354e1e42ad fix: enforce minimal push for push_slice 2025-04-17 06:03:57 +09:00
merge-script 9364cd1f7c
Merge rust-bitcoin/rust-bitcoin#4343: units: Go over the rendered docs for the whole crate
913360b112 Make struct titles consistent (Jamil Lambert, PhD)
afe9ddd5e6 Remove - in fee rate (Jamil Lambert, PhD)
ebc6b4a876 Make warning text bold (Jamil Lambert, PhD)

Pull request description:

  I have read through all of the `units` docs and made a few changes.

  - Highlight `Warning!` in bold in `Amount` and `SignedAmount`

  - Change the one occurrence of fee-rate to fee rate to be consistent with the rest.

  - Make all of the error structs have the same title format of `Error returned...`

  - Make all other structs have the same format concisely stating what it is opposed to what it does.

ACKs for top commit:
  tcharding:
    ACK 913360b112

Tree-SHA512: 4cb08d1dae091f5b827cf9f1e931b057c6670002146a22da54886148f3052f6ea7050fcd7f62c0d83438ef170e2f109c1a36f47a280808f31466da6f3177dd01
2025-04-16 19:10:02 +00:00
merge-script b473a2090a
Merge rust-bitcoin/rust-bitcoin#4258: units: Improve code enforcing privacy boundry
ca6c607953 Adhere to sanity rules for amount types (Tobin C. Harding)
6c614d9320 units: Fix panic message (Tobin C. Harding)

Pull request description:

  This is a follow up to #4256 - onwards and upwards!

  - Patch 1: Fix the incorrect BTC value in panic message
  - Patch 2: Strictly adhere to the sanity rules (#4090)

   Close: #4140

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

Tree-SHA512: 6d7fd60830e1a0f6d6262ab02ec6e297b095d0fe8fb7737563979652e4a3b4a9477a79982201c42b08e2555fd23dc5c430549966b534bdf45f40621ae81da83a
2025-04-16 18:33:09 +00:00
Jamil Lambert, PhD b4b61cb884
Add tests to increase coverage
There are missed lines in coverage when running `cargo tarpaulin` on
`Script`.

Add tests to cover all lines missed except for `serde`.
2025-04-16 19:19:22 +01:00
merge-script 188b4f439e
Merge rust-bitcoin/rust-bitcoin#4269: Implement `Display` for `Header`
e3b059cebf Implement Display for block::Header (Tobin C. Harding)

Pull request description:

  Not all the fields within `block::Header` implement `Display` however a block header can reasonably be displayed by using 160 hex characters.

  Implement `Display` for `block::Header` by printing the header in hex in the same layout as we hash it in `block_hash`.

  Close: #3658

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

Tree-SHA512: c1ff0d73562c9e00e93659f385a471c2d7912e1f09faf6c646bd7864d1a98e6e2baddebfcd1a032bf5adc3e27586022927261c8867098f7e7bf166bf35a9ffbd
2025-04-16 17:54:23 +00:00
Jamil Lambert, PhD 6bcc6b703d
Expand display test to cover debug and OP_0
Add to the test to cover the `fmt::Debug` impl without checking the
actual text.

Change one of the opcodes so that the display of the special case OP_0
is checked.
2025-04-16 18:21:50 +01:00
Jamil Lambert, PhD 8a096b77d5
Expand as_ref and as_mut tests
The tests for both `Script` and `ScriptBuf` `as_ref` and `as_mut` only
covered the `u8` impl.

Expand the tests to cover the `Self` impl as well.

The allow useless_asref is required to remove a clippy lint.  Removing
the "useless" as_ref also removes the test coverage of the as_ref or
as_mut impl.
2025-04-16 18:21:50 +01:00
Jamil Lambert, PhD afa51f7bfa
Add missing empty line, and remove extra one
Make all tests functions have a single blank line between them
2025-04-16 18:21:43 +01:00
merge-script 0afe65f01f
Merge rust-bitcoin/rust-bitcoin#4017: hashes: Add an `api` test module
f268ca20c5 hashes: Add api test file (Tobin C. Harding)

Pull request description:

  As we did for `units` and as part of the stabalization effort.

  Add an `api` test module that verifies the public API for the `hashes` crate.

  Close: #3927

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

Tree-SHA512: d3c1675ba01d2d250c677a2d4b52c3a500417a50e9af40d6596c279cdb798aa96bf423de92492a83880377fa40f50bf906765123c6bc722799fd4786da372c1f
2025-04-16 15:51:18 +00:00
merge-script 1134abce97
Merge rust-bitcoin/rust-bitcoin#4338: primitives: Document script to/from bytes
35ca48a85c primitives: Document script to/from bytes (Tobin C. Harding)

Pull request description:

  The byte slice/vector in the to/from methods for the script types does not include the length prefix that is used when consensus encoding.

  Add docs to make this more clear.

ACKs for top commit:
  apoelstra:
    ACK 35ca48a85cd90fc9c1b13da439177a4772c1c330; successfully ran local tests; yeah, I like this

Tree-SHA512: 6efeddfd8fe9e5bb32a6d40ca1a0fa3aa686047ad9f4cb865e3c70f8339cd39c18daa01441a1a5898300b1e73150b39c53d507af528830bbd68904148b65ef35
2025-04-16 15:08:34 +00:00
merge-script 551b52c7d1
Merge rust-bitcoin/rust-bitcoin#4348: refactor: Replace fold with try_fold
812c21e2e4 refactor: Replace fold with try_fold (yancy)

Pull request description:

  The and_then combinator performs a kind of bitwise and operation on two Option types here.  This is useful since the `checked` arithmetic returns an option thereby accumulating Option types.  Therefore, either the checked arithmetic operation performs the addition of the unwrapped accumulator, or it returns None.

  Instead of using `and_then` use the provided `try_fold` method which will short circuit on `None` when the checked arithmetic is used.  Also, simplify the staring condition using `Amount:ZERO` since this is logically equivalent to using the first value if one exists.

  Lastly, by using the built in `try_fold`, it's possible the performance will be improved by making use of the short circuit ability instead of evaluating each item even when the accumulator holds a None type.

ACKs for top commit:
  apoelstra:
    ACK 812c21e2e4a868046b44728c1a6209a866452820; successfully ran local tests
  tcharding:
    ACK 812c21e2e4

Tree-SHA512: 1cfcd4fa28e2b59daf3744bb5f654f65eb9853c5a36f747cb0859783e7e46c1d02ccb296612b75f7cca10782979ce052cd670c0f23c1030e0a347000d1f6df83
2025-04-16 13:56:34 +00:00
Tobin C. Harding c30a504ea6
units: Document the NumOpResult type
The `NumOpResult` type is a bit unusual. Add thorough documentation
and example usage to it.
2025-04-16 18:17:09 +10:00
Tobin C. Harding e3b059cebf
Implement Display for block::Header
Not all the fields within `block::Header` implement `Display` however
a block header can reasonably be displayed by using 160 hex characters.

Implement `Display` for `block::Header` by printing the header in hex in
the same layout as we hash it in `block_hash`.
2025-04-16 17:24:41 +10:00
merge-script 7d05078b6a
Merge rust-bitcoin/rust-bitcoin#4349: minor docstring fixups message.rs
793920d6bf minor docstring fixups message.rs (Bilog WEB3)

Pull request description:

  Please fix this error, thank you

ACKs for top commit:
  apoelstra:
    ACK 793920d6bf7437e6f4f24d794818e885094992d8; successfully ran local tests

Tree-SHA512: 5e152299ceab2962ac841a3935877a2264654e7f1d296c0486b2548f57f9cc9106590f6fc92b0a4adaba44d909457e932cd706e76ab814067c5972afa4d8ab93
2025-04-16 00:13:03 +00:00
Jamil Lambert, PhD 913360b112
Make struct titles consistent
Structs had various phrasings of titles.

Make the wording consistent by concisely stating what it is, instead of
what it does.

Make the wording of all error structs consistent.
2025-04-15 21:23:31 +01:00
Jamil Lambert, PhD afe9ddd5e6
Remove - in fee rate
The rest of the rustdocs use fee rate with no hyphen when using it in
normal language, i.e. not a function argument or the type.

Change it to match the others.
2025-04-15 21:22:18 +01:00
Jamil Lambert, PhD ebc6b4a876
Make warning text bold 2025-04-15 21:22:12 +01:00
merge-script 9ae40372b2
Merge rust-bitcoin/rust-bitcoin#4346: chore: Fix the typos in the comments and variables
d0e1cd72fe chore: Fix the typos in the comments and variables (dufucun)

Pull request description:

  Fix the typos in the comments and variables

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

Tree-SHA512: 267d2b6b47e5a4f9466507e9dceb62ce94c848b3edefee65b85c3ce31560d1be880ef1c03ffd7dac54198f1f470695b70e06a505f91174f2990639bc20bf86e4
2025-04-15 18:49:14 +00:00
merge-script ee43f9235b
Merge rust-bitcoin/rust-bitcoin#4342: Remove Option return from `minimal_non_dust`
0498f7b7b7 Remove Option return from `minimal_non_dust` (jrakibi)

Pull request description:

  Closes #4221

  This removes the `Option` return type from `minimal_non_dust

  Overflow is only possible in 2 cases:
  - `dust_relay_fee` would need to be excessively high
  - script size would have to exceed ~6.15 × 10¹⁵ bytes (≈ 6 petabytes)

  we now panic with the same message we had before in  cf12ba262a/bitcoin/src/blockdata/script/borrowed.rs (L412)

ACKs for top commit:
  tcharding:
    ACK 0498f7b7b7
  apoelstra:
    ACK 0498f7b7b7d43cc015d6788efe826df25d6156a5; successfully ran local tests

Tree-SHA512: 826a5d4ebb9c237cdd261f7d8b25fb2118cfba7d79b031839a619e12c440cbd34bbf830ffe513c104ef34e8ae50320e314c736a55be9ba7a82ae50f6022b9cf0
2025-04-15 17:19:54 +00:00
merge-script 93e2000b98
Merge rust-bitcoin/rust-bitcoin#4262: primitives: Make `hex` optional
a5f904559d primitives: Make hex optional (Tobin C. Harding)

Pull request description:

  Make the `hex` dependency optional. This means not implementing
      `Display` for some types if `hex` is not enabled and only implementing
      `Debug`.

      Also without `hex` enabled:

      - We loose the ability to parse an `OutPoint` from string because we
        can no longer parse `Txid`.

      - We loose the hex formatting of witness elements.

      Note also that `primitives` builds with the `serde` feature even if
      `hex?/serde` is excluded from the `serde` feature. I found this
      surprising.

  Close: #4183

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

Tree-SHA512: c105e089508036af8251cb923f3eda163b8f2d6151ea043aa1489edb6ce396975d1f598a240f4ca6e48f6ef780774f7d86cb70ec9399f3d2ff87c0ac53ceee91
2025-04-15 15:45:42 +00:00
merge-script c14044e76e
Merge rust-bitcoin/rust-bitcoin#4341: units: Improve crate level docs
53837d9a2e units: Improve crate level docs (Tobin C. Harding)

Pull request description:

  Add a bit more to the crate level docs. This is a simple crate so we don't need all that much.

  Done for: C-CRATE-DOC

ACKs for top commit:
  apoelstra:
    ACK 53837d9a2e1cc70e180de39c16e2d212e958a9f3; successfully ran local tests

Tree-SHA512: 374c27a25cdc9bd4edd0755be02cad66ccccedcd69836506c1f4eb86a1254bfafe11eeb6fcc27b7efd2ab3ca0acd1daa304d482c7e5a7f84ffbcffbb1bcd21d6
2025-04-15 15:12:26 +00:00
Bilog WEB3 793920d6bf
minor docstring fixups message.rs 2025-04-15 16:28:26 +02:00
merge-script a7c7ff94a6
Merge rust-bitcoin/rust-bitcoin#4333: Automated nightly rustfmt (2025-04-13)
19c5fcc78f 2025-04-13 automated rustfmt nightly (Fmt Bot)

Pull request description:

  Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK 19c5fcc78f

Tree-SHA512: 1008800b18e1efc14e773d4364ccbda0f8382e93c55feec22f6570d26cc7ad826c984c2fd4e17feabf37cd91e1eb17bcb019d7b0310568616bf3ca594abddf3c
2025-04-15 14:05:51 +00:00
yancy 812c21e2e4 refactor: Replace fold with try_fold
The and_then combinator performs a kind of bitwise and operation on two
Option types here.  This is useful since the `checked` arithmetic
returns an option thereby accumulating Option types.  Therefore, either
the checked arithmetic operation performs the addition of the unwrapped
accumulator, or it returns None.

Instead of using `and_then` use the provided `try_fold` method which
will short circuit on `None` when the checked arithmetic is used.  Also,
simplify the staring condition using `Amount:ZERO` since this is
logically equivalent to using the first value if one exists.

Lastly, by using the built in `try_fold`, it's possible the performance
will be improved by making use of the short circuit ability instead of
evaluating each item even when the accumulator holds a None type.
2025-04-15 08:21:11 -05:00
merge-script e5b0f9cd92
Merge rust-bitcoin/rust-bitcoin#4337: Add impls for `NumOpResult` div and mul
0361604bab Add impls for NumOpResult div and mul (Tobin C. Harding)

Pull request description:

  We recently added div and mul for combinations of `Amount`, `FeeRate`, and `Weight`. When doing so we forgot to add variations for `NumOpResult`.

ACKs for top commit:
  apoelstra:
    ACK 0361604bab6c6ef260410d0bd6e33ce24a41e775; successfully ran local tests

Tree-SHA512: 6d262b9079b8a670f32d58d49e3c7e9a79d5d795a4c9f37f6bc2213879649d41900e95f515d8685c3870c935358bcb25567b2f6f332301e1ad88188056047b7b
2025-04-15 13:20:09 +00:00
dufucun d0e1cd72fe chore: Fix the typos in the comments and variables
Signed-off-by: dufucun <dufuchun@sohu.com>
2025-04-15 18:31:52 +08:00
merge-script 7c51612136
Merge rust-bitcoin/rust-bitcoin#4332: fix typo in test function name
a697af9755 Update tests.rs (Maxim Evtush)

Pull request description:

  Description:
  This PR fixes a typo in the test function name `p2pk_pubkey_bytes_emptry_script_returns_none()` by correcting 'emptry' to 'empty'. This is a minor correction that improves code readability without affecting functionality.

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

Tree-SHA512: 8fd8b29a4d0e0dfac8769eaf6b9c7bfaea395f58ce58280410dbe8cbcda7e52bc15e542034826c7e7f1a0117256d99dca43789015c3f0e946acbf9714d8c5562
2025-04-14 19:27:45 +00:00
merge-script e3c5f8cbdf
Merge rust-bitcoin/rust-bitcoin#4329: units: Add a test to kill mutants in MathOp
ec38860b65 Add a test to kill mutants in MathOp (Jamil Lambert, PhD)

Pull request description:

  Weekly mutation testing found mutants in `is_overflow` and `is_divide_by_zero`.

  Add a test to kill them.

  Closes #4310
  Closes #4334

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

Tree-SHA512: 05d46d5792cb355d8b79f197bcb397d762c8f5593005589f46b9d085f357d168b767e6deaf30b8bf61434652f9f1db1a09b5f753f30c2e22d7e80450cef61182
2025-04-14 18:20:57 +00:00
merge-script 0089b535ea
Merge rust-bitcoin/rust-bitcoin#4327: primitives: Add tests to improve coverage
7e1369b3f1 Cover all TryFrom implementations in Script (Jamil Lambert, PhD)
6dfa3d8f4d Update test to increase coverage (Jamil Lambert, PhD)

Pull request description:

  Update test in borrowed to cover the `default` implementation of `Script`.

  Add tests to cover all `TryFrom` implementations in `Script`

ACKs for top commit:
  apoelstra:
    ACK 7e1369b3f1a7789b2757951c2e3ff58937442200; successfully ran local tests
  tcharding:
    ACK 7e1369b3f1

Tree-SHA512: 766b8eb63abbb1f10670f42b3789a8a4d4d73470ade13f14a1140d4cdd93b49d79865645d49f404774d8ff7aeb22b68059275902dc063d2baaf79fc8a89dca95
2025-04-14 13:53:01 +00:00