|
Ran
|
Jobs
1
|
Files
116
|
Run time
1min
|
Badge
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#3839: Use `_unchecked` to construct amounts <a class=hub.com/rust-bitcoin/rust-bitcoin/commit/a7c44cebf9975c4eeba56a65c0ea65be90e5c7f3">a7c44cebf<a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/515a66b8540447211dcbc9e42134c37a4977261b"> Use _unchecked to construct amounts (Tobin C. Harding) <a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/09df951760e02bdcc488616d3f924046c6d28e85">09df95176</a><a href="https://github.com/rust-bitcoin/rust-bitcoin/commit/515a66b8540447211dcbc9e42134c37a4977261b"> Use sat variable in tests (Tobin C. Harding) </a><a class="double-link" href="https://github.com/rust-bitcoin/rust-bitcoin/commit/4a5b2c60c6dc40905d3081d291536a6cff473813">4a5b2c60c</a> Use ssat variable in tests (Tobin C. Harding) Pull request description: We have a `_unchecked` constructor now for both `Amount` and `SignedAmount`. Soon we would like to start enforcing the `MAX_MONEY` invariant in both amount types. To make that change easier do a few refactorings: - Patch 1 and 2 introduce local variables for amount constructors. - Patch 3 replaces the local variables introduce in (1) and (2) with macros - Patch 4 uses `_unchecked` constructor for hard coded integers The strange patch separation is done intentionally so we don't inadvertently reduce test coverage by using the wrong constructor. I made this mistake already in a previous PR, lesson learned. Note please, the macro introduced in patch 3 is in preparation for enforcing `MAX_MONEY`. The macros allow us to panic (`from_sat().unwrap()`) instead of using the `_unchecked` version. ACKs for top commit: apoelstra: ACK a7c44cebf9975c4eeba56a65c0ea65be90e5c7f3; successfully ran local tests Tree-SHA512: 55c2428ae58f4bec261a96855fa7ee18667
123 of 123 new or added lines in 5 files covered. (100.0%)
20721 of 24967 relevant lines covered (82.99%)
17424.19 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 12663898767.1 | 0 |
82.99 |
GitHub Action Run |