Commit c2279f8
committed
Route the skim site through resolve_skim
Replace the inline compute_forward_fee block in
calculate_htlc_actions_for_peer with a single resolve_skim call against a
literal Flat(Standard) policy. This is the one place the LSP decides what
to skim; routing it through the pure function is what later milestones
need to swap the literal for a per-peer policy lookup.
Not a strict no-op: it inherits the u128 overflow fix from resolve_skim,
so a >9223-BTC HTLC is now skimmed 2% instead of overflowing and
forwarding free. Every realistic HTLC is unchanged. The peer's stored
policy is still ignored; every forward resolves Flat(Standard) until the
lookup lands.
The two old log lines (overflow, skim-ate-the-HTLC) collapse into one:
resolve_skim can't overflow, so a zero skim on a non-zero HTLC can only
mean the fee would have eaten the whole amount.1 parent 8892efe commit c2279f8
2 files changed
Lines changed: 15 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
65 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | | - | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
| 743 | + | |
| 744 | + | |
744 | 745 | | |
745 | 746 | | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
760 | 751 | | |
761 | 752 | | |
762 | | - | |
| 753 | + | |
763 | 754 | | |
764 | 755 | | |
765 | | - | |
766 | | - | |
767 | 756 | | |
768 | 757 | | |
769 | | - | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
770 | 761 | | |
771 | 762 | | |
772 | 763 | | |
| |||
0 commit comments