rust-lightning/lightning/src/ln
Antoine Riard 16619ff590 Replace config max counterpary dust_limit_satoshis by a constant.
Current Bitcoin Core's policy will reject a p2wsh as a dust if it's
under 330 satoshis. A typical p2wsh output is 43 bytes big to which
Core's `GetDustThreshold()` sums up a minimal spend of 67 bytes (even
if a p2wsh witnessScript might be smaller). `dustRelayFee` is set
to 3000 sat/kb, thus 110 * 3000 / 1000 = 330. As all time-sensitive
outputs are p2wsh, a value of 330 sat is the lower bound desired
to ensure good propagation of transactions. We give a bit margin to
our counterparty and pick up 660 satoshis as an accepted
`dust_limit_satoshis` upper bound.

As this reasoning is tricky and error-prone we hardcode it instead of
letting the user picking up a non-sense value.

Further, this lower bound of 330 sats is also hardcoded as another constant
(MIN_DUST_LIMIT_SATOSHIS) instead of being dynamically computed on
feerate (derive_holder_dust_limit_satoshis`). Reducing risks of
non-propagating transactions in casee of failing fee festimation.
2021-05-03 15:37:38 -04:00
..
chan_utils.rs Rename ChannelKeys -> Sign and generic it consistently 2021-02-19 15:54:41 -05:00
chanmon_update_fail_tests.rs Drop pub functions for ChainMonitor's Listen impl 2021-04-22 14:17:26 -07:00
channel.rs Replace config max counterpary dust_limit_satoshis by a constant. 2021-05-03 15:37:38 -04:00
channelmanager.rs Merge pull request #890 from TheBlueMatt/2021-04-fix-chan-shutdown-crash 2021-04-24 00:03:42 +00:00
features.rs Drop all HTML-relative links since rustdoc now supports resolution 2021-03-18 11:28:23 -04:00
functional_test_utils.rs Drop pub functions for ChainMonitor's Listen impl 2021-04-22 14:17:26 -07:00
functional_tests.rs Replace config max counterpary dust_limit_satoshis by a constant. 2021-05-03 15:37:38 -04:00
mod.rs Add a simple send-funds benchmark in channelmanager 2021-03-31 19:55:23 -04:00
msgs.rs Merge pull request #841 from valentinewallace/207-replacement 2021-03-17 22:41:30 +00:00
onchaintx.rs Rename onchain_events_waiting_threshold_conf 2021-04-14 13:00:16 -07:00
onion_route_tests.rs [tests] Drop redundant parameters from connect_blocks 2021-03-19 23:32:38 -04:00
onion_utils.rs Log the node generating an onion error 2021-04-05 16:23:34 -04:00
peer_channel_encryptor.rs fix all clippy::redundant_field_names warnings 2020-10-07 11:20:21 -07:00
peer_handler.rs [peer_handler] Take the peers lock before getting messages to send 2021-04-21 22:03:45 +00:00
reorg_tests.rs Implement chain::Confirm for relevant structs 2021-04-22 14:17:26 -07:00
wire.rs Drop all HTML-relative links since rustdoc now supports resolution 2021-03-18 11:28:23 -04:00