rust-bitcoin-unsafe-fast/bitcoin
Jonathan Underwood 1b23220d10
Fix: TxOut::minimal_non_dust and Script::dust_value
TxOut::minimal_non_dust has 3 problems.

1. There is an invisible dependency on Bitcoin Core's default minrelaytxfee value. It has been made explicit.
2. There is an off by one error. The dust limit comparison uses < and therefore `+ 1` was not needed. It has been fixed.
3. It was not returning 0 amount for OP_RETURN outputs.

Script::dust_value has 2 problems.

1. The dust amount depends on minrelaytxfee which is configurable in Bitcoin Core. This method was not configurable.
2. The division operation was done before multiplying the byte amount, which can cause small differences when using uncommon scripts and minrelaytxfee values.
2023-12-07 22:55:22 -07:00
..
contrib bitcoin: Add DO_FEATURE_MATRIX 2023-12-06 10:09:05 +11:00
embedded Remove no-std feature 2023-12-06 09:54:33 +11:00
examples bitcoin: Add signing examples 2023-10-31 10:11:48 +11:00
src Fix: TxOut::minimal_non_dust and Script::dust_value 2023-12-07 22:55:22 -07:00
tests Remove imports of TryFrom and TryInto 2023-11-24 03:52:05 +11:00
CHANGELOG.md Remove no-std feature 2023-12-06 09:54:33 +11:00
Cargo.toml Remove no-std feature 2023-12-06 09:54:33 +11:00
build.rs Bump MSRV to Rust version 1.56.1 2023-11-23 06:20:02 +11:00