Commit 4f84f19
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 6ecacc4 commit 4f84f19
3 files changed
+26
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3981 | 3981 | | |
3982 | 3982 | | |
3983 | 3983 | | |
3984 | | - | |
| 3984 | + | |
3985 | 3985 | | |
3986 | 3986 | | |
3987 | 3987 | | |
3988 | | - | |
| 3988 | + | |
3989 | 3989 | | |
3990 | 3990 | | |
3991 | | - | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
3992 | 3996 | | |
3993 | 3997 | | |
3994 | | - | |
| 3998 | + | |
3995 | 3999 | | |
3996 | 4000 | | |
3997 | 4001 | | |
| |||
4338 | 4342 | | |
4339 | 4343 | | |
4340 | 4344 | | |
4341 | | - | |
| 4345 | + | |
4342 | 4346 | | |
4343 | 4347 | | |
4344 | 4348 | | |
| |||
4678 | 4682 | | |
4679 | 4683 | | |
4680 | 4684 | | |
4681 | | - | |
| 4685 | + | |
4682 | 4686 | | |
4683 | 4687 | | |
4684 | 4688 | | |
| |||
4757 | 4761 | | |
4758 | 4762 | | |
4759 | 4763 | | |
4760 | | - | |
| 4764 | + | |
| 4765 | + | |
| 4766 | + | |
| 4767 | + | |
| 4768 | + | |
| 4769 | + | |
| 4770 | + | |
4761 | 4771 | | |
4762 | 4772 | | |
4763 | 4773 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9941 | 9941 | | |
9942 | 9942 | | |
9943 | 9943 | | |
9944 | | - | |
| 9944 | + | |
9945 | 9945 | | |
9946 | 9946 | | |
9947 | 9947 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
445 | 450 | | |
446 | 451 | | |
447 | 452 | | |
448 | 453 | | |
449 | 454 | | |
450 | 455 | | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
451 | 459 | | |
452 | 460 | | |
453 | 461 | | |
| |||
0 commit comments