Commit b1dea35
committed
ln: return Option for dust_exposure_limiting_feerate
This fee rate is currently used in two scenarios:
- To count any fees above what we consider to be a sane estimate towards
our dust exposure.
- To get a maximum dust exposure (when using
MaxDustHTLCExposure::FeeEstimator strategy).
When we have zero fee commitments:
- Commitments are zero fee, so we don't need to count fees towards dust
exposure.
- The amount of dust we have is not dependent on fees, as everything is
zero fee.
- We still want to limit our total dust exposure.
This commit updates get_dust_exposure_limiting_feerate to allow a None
value to prepare for support for zero fee commitments. This clearly
allows us to indicate when we don't care about fee rates for dust
considerations.
In get_max_dust_htlc_exposure_msat, we simply hardcode a value of
1 sat/vbyte if a feerate dependent strategy is being used.1 parent 8046a3b commit b1dea35
3 files changed
+24
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3833 | 3833 | | |
3834 | 3834 | | |
3835 | 3835 | | |
3836 | | - | |
| 3836 | + | |
3837 | 3837 | | |
3838 | 3838 | | |
3839 | 3839 | | |
3840 | | - | |
| 3840 | + | |
3841 | 3841 | | |
3842 | 3842 | | |
3843 | | - | |
| 3843 | + | |
| 3844 | + | |
| 3845 | + | |
| 3846 | + | |
| 3847 | + | |
3844 | 3848 | | |
3845 | 3849 | | |
3846 | | - | |
| 3850 | + | |
3847 | 3851 | | |
3848 | 3852 | | |
3849 | 3853 | | |
| |||
4220 | 4224 | | |
4221 | 4225 | | |
4222 | 4226 | | |
4223 | | - | |
| 4227 | + | |
4224 | 4228 | | |
4225 | 4229 | | |
4226 | 4230 | | |
| |||
4583 | 4587 | | |
4584 | 4588 | | |
4585 | 4589 | | |
4586 | | - | |
| 4590 | + | |
4587 | 4591 | | |
4588 | 4592 | | |
4589 | 4593 | | |
| |||
4662 | 4666 | | |
4663 | 4667 | | |
4664 | 4668 | | |
4665 | | - | |
| 4669 | + | |
| 4670 | + | |
| 4671 | + | |
| 4672 | + | |
| 4673 | + | |
4666 | 4674 | | |
4667 | 4675 | | |
4668 | 4676 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9953 | 9953 | | |
9954 | 9954 | | |
9955 | 9955 | | |
9956 | | - | |
| 9956 | + | |
9957 | 9957 | | |
9958 | 9958 | | |
9959 | 9959 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
438 | 438 | | |
439 | 439 | | |
440 | 440 | | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
444 | 449 | | |
445 | 450 | | |
446 | 451 | | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
447 | 455 | | |
448 | 456 | | |
449 | 457 | | |
| |||
0 commit comments