Conversation
|
👋 I see @TheBlueMatt was un-assigned. |
TheBlueMatt
left a comment
There was a problem hiding this comment.
This violates a number of the API constraints on sending payments - specifically, someone could send a payment, then restart and they wouldn't see the pending payment, thinking they hadn't "sent" it. Check out some of the early feedback on the first attempt at this #2573
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4328 +/- ##
==========================================
+ Coverage 86.53% 86.54% +0.01%
==========================================
Files 158 158
Lines 103188 103280 +92
Branches 103188 103280 +92
==========================================
+ Hits 89292 89385 +93
Misses 11471 11471
+ Partials 2425 2424 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
845b3ab to
7c3801a
Compare
7c3801a to
bd480a5
Compare
I reworked this based on feedback in #2573 . We now try routing first and only fall back to a self-payment check if it fails, so explicit self-routes still work for rebalancing. I have also added phantom node support. this implementation reuses existing code without adding new |
|
Yea, sadly I really don't think this is all that easy of a task - in order to provide the same semantics we provide for regular payments to self-payments (which imo is a strong requirement to land this) we need to have a disk write involved and keep the pending payment around like we do normal payments. Its not really entirely clear to me how we should do that - for a normal payment the way we do disk writes is via |
thanks for the explanation, I'm willing to implement the channel-based approach you explained, i just wanted to confirm should self payments only work when the node has at least one channel or should we handle the zero-channel case differently? |
|
Yea, I think its fine to just only allow self-payments if we have at least one channel. Devs shouldn't expect payments to work if they have no channels anyway. |
fix #2462
implemented the following in
outbound_payment.rs:added test case
self_spontaneous_payment_fulfills()to test self payment