Ran
|
Files
91
|
Run time
2s
|
Badge
Embed ▾
README BADGES
|
push
github
Merge rust-bitcoin/rust-bitcoin#2604: Enforce displaying Amount with trailing zeros <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/d887423efcdad8db4c60ffe61f53d2356c82c87c">d887423ef Enforce displaying Amount with trailing zeros (448 OG) Pull request description: It is common to display bitcoins using trailing zeros upto 8 decimals. This commit enforces: - Displaying Amount in BTC with trailing zeroes by eight decimal places if a precision on the Amount is not specified. - Displaying Amount in BTC upto the precision specified truncating the insignificant zeros. - Displaying amount in BTC without any decimals if the remainder of the amount divided by the satoshis in 1 BTC is equal to zero using formula `satoshis.rem_euclid(Amount::ONE_BTC.to_sat()) != 0` These are not breaking changes and all previous tests pass. A testcase is added to for changes introduced. Resolves: #2136 ACKs for top commit: sanket1729: ACK d887423efcdad8db4c60ffe61f53d2356c82c87c apoelstra: ACK d887423efcdad8db4c60ffe61f53d2356c82c87c Tree-SHA512: c32e41216c7e16974308c04ce65e9d522bc
19732 of 23511 relevant lines covered (83.93%)
16449.48 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|