Commit 489c6f6
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 1b70e6d commit 489c6f6
3 files changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3999 | 3999 | | |
4000 | 4000 | | |
4001 | 4001 | | |
4002 | | - | |
| 4002 | + | |
4003 | 4003 | | |
4004 | 4004 | | |
4005 | 4005 | | |
4006 | | - | |
| 4006 | + | |
4007 | 4007 | | |
4008 | 4008 | | |
4009 | | - | |
| 4009 | + | |
| 4010 | + | |
| 4011 | + | |
| 4012 | + | |
| 4013 | + | |
4010 | 4014 | | |
4011 | 4015 | | |
4012 | | - | |
| 4016 | + | |
4013 | 4017 | | |
4014 | 4018 | | |
4015 | 4019 | | |
| |||
4356 | 4360 | | |
4357 | 4361 | | |
4358 | 4362 | | |
4359 | | - | |
| 4363 | + | |
4360 | 4364 | | |
4361 | 4365 | | |
4362 | 4366 | | |
| |||
4696 | 4700 | | |
4697 | 4701 | | |
4698 | 4702 | | |
4699 | | - | |
| 4703 | + | |
4700 | 4704 | | |
4701 | 4705 | | |
4702 | 4706 | | |
| |||
4775 | 4779 | | |
4776 | 4780 | | |
4777 | 4781 | | |
4778 | | - | |
| 4782 | + | |
| 4783 | + | |
4779 | 4784 | | |
4780 | 4785 | | |
4781 | 4786 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
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