rust-bitcoin-unsafe-fast/bitcoin/src
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
..
address Merge rust-bitcoin/rust-bitcoin#2120: Improve public re-exports 2023-11-15 13:51:51 +00:00
blockdata Fix: TxOut::minimal_non_dust and Script::dust_value 2023-12-07 22:55:22 -07:00
consensus Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
crypto Add `taproot::SerializedSignature` 2023-12-06 11:02:35 +01:00
merkle_tree Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
p2p Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
psbt Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
taproot Add `taproot::SerializedSignature` 2023-12-06 11:02:35 +01:00
amount.rs Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
base58.rs Remove imports of TryFrom and TryInto 2023-11-24 03:52:05 +11:00
bip32.rs Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
bip152.rs Make error types uniform 2023-10-04 15:15:52 +11:00
bip158.rs Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
error.rs Improve public re-exports 2023-10-31 15:16:47 +11:00
hash_types.rs add conversions from TXIDs to merkle nodes 2023-11-27 00:12:16 +00:00
internal_macros.rs [IO] Move to custom `Read` trait mirroring `std::io::Read` 2023-11-07 05:51:39 +00:00
lib.rs Remove no-std feature 2023-12-06 09:54:33 +11:00
network.rs Remove imports of TryFrom and TryInto 2023-11-24 03:52:05 +11:00
parse.rs Remove imports of TryFrom and TryInto 2023-11-24 03:52:05 +11:00
policy.rs bitcoin: Remove attribution from all files 2023-05-01 09:22:48 +10:00
pow.rs Use conventional import path for io crate 2023-11-29 08:48:03 +11:00
serde_utils.rs Depend on hex-conservative 2023-07-21 10:59:46 +10:00
sign_message.rs Improve public re-exports 2023-10-31 15:16:47 +11:00
string.rs Make error types uniform 2023-10-04 15:15:52 +11:00
test_macros.rs bitcoin: Remove attribution from all files 2023-05-01 09:22:48 +10:00