Uh oh!
There was an error while loading. Please reload this page.
Calculate InFlightHtlcs based on information in ChannelManager - #1830
Conversation
jurvis
commented
Nov 4, 2022
we probably need to rework the testing strategy for |
jkczyz
commented
Nov 4, 2022
Concept ACK with caveats discussed offline about testing and payment cache. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d5c8465 to
30d7805Compare| }); | ||
| } | ||
| #[test] |
There was a problem hiding this comment.
we no longer populate inflight path information based on events, so there is probably no need to have tests for this any longer.
30d7805 to
2806be6Comparejurvis
commented
Nov 13, 2022
rebased to resolve conflict in |
Codecov ReportBase: 90.61% // Head: 90.97% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@## main #1830 +/- ##
==========================================
+ Coverage 90.61% 90.97% +0.36%
==========================================
Files 90 91 +1 Lines 47623 50202 +2579 Branches 47623 50202 +2579 ==========================================
+ Hits 43152 45670 +2518 - Misses 4471 4532 +61
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jurvis
commented
Nov 14, 2022
thanks for the review @valentinewallace! I'll make the changes. additional note: I'm going to be writing an additional tests to make sure HTLCs in holding cells are calculated when producing |
853282a to
673d36fComparejurvis
commented
Nov 15, 2022
Resolved review comments, added a functional test in 673d36f to check if holding cells HTLCs show up in |
Uh oh!
There was an error while loading. Please reload this page.
| /// Gets inflight HTLC information by processing pending outbound `HTLCSource`s that are in | ||
| /// our channels. |
There was a problem hiding this comment.
I think we should document the usage, because IIRC this isn't intended to be used for users to view their in-flight payments, just for routing purposes? Lmk if I'm off there
There was a problem hiding this comment.
Yeah, that's correct. We'll work on an API for viewing pending payments in a follow-up PR, since we think it may need a different solution.
I'll add a little bit more context here to make its intended use more explicit.
There was a problem hiding this comment.
@valentinewallace I added a comment to specify that we use this information for pathfinding, but let me know if it can be better :)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
673d36f to
2c8fdd3CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
2c8fdd3 to
8449c71Comparevalentinewallace
commented
Nov 17, 2022
Needs rebase as well, sorry! |
8449c71 to
7d6b109Comparejurvis
commented
Nov 17, 2022
@valentinewallace thanks for pointing that out -- rebased! |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
7d6b109 to
b51db04CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
b51db04 to
3e8926dCompare
valentinewallace
left a comment
There was a problem hiding this comment.
LGTM, feel free to take or leave nits
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3e8926d to
fd4792aComparejurvis
commented
Nov 17, 2022
@valentinewallace nits very much appreciated :) thanks! |
TheBlueMatt
left a comment
There was a problem hiding this comment.
Will let @jkczyz review + merge.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In c70bd1f, we implemented tracking HTLCs by adding path information for pending HTLCs to `InvoicePayer`’s `payment_cache` when receiving specific events. Since we can now track inflight HTLCs entirely within ChannelManager, there is no longer a need for this to exist.
3136d73fd4792a to
3136d73Compare
Follow-up of #1643 (comment).
Currently, we populate path information about payments we attempt to send/retry in
InvoicePayer'spayment_cache. It allows us to compute anInFlightHtlcsstruct that we pass to the router so that its values can be considered when routing.This PR introduces an improvement since
ChannelManageractually knows about changing liquidity information since it produces the payment events thatInvoicePayerrelies on to populate path information inpayment_cache