You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emit PaymentReceived on upstream PaymentReceived or PaymentClaimed? #34
Having PaymentReceivedandPaymentClaimed in LDK Lite might be a bit verbose for the 'simplified' API.
If we only want to have one, i.e., PaymentReceived event, it raises the question when we should emit it: on receiving PaymentReceived or PaymentClaimed?
Or do we want to mirror both events here after all?
LDKLite should just expose PaymentClaimed, ie that we have received and claimed a payment, not PaymentReceived, which it should just handle by calling claim_payment.
Yes, this is also what I'm leaning towards, only issue being that I find PaymentReceived a much more intuitive name to use for this event in LDK Lite, which however would shadow the upstream event with different meaning, i.e., would be pretty confusing if someone is aware of LDK Events already. I'll have to think about whether there is a good alternative naming for it.
For the record, I'd find using something along the lines of PaymentIncoming / PaymentReceived also more intuitive than PaymentReceived/PaymentClaimed upstream, since PaymentReceived sounds pretty final by itself, even though it's actually not.
For the record, I'd find using something along the lines of PaymentIncoming / PaymentReceived also more intuitive than PaymentReceived/PaymentClaimed upstream, since PaymentReceived sounds pretty final by itself, even though it's actually not.
+1, I've gotten similar feedback about PaymentReceived being a confusing name
Any suggestions for a better one? We should totally rename it upstream if it makes sense.
As mentioned above (in an edit), maybe something along the lines of PaymentReceived -> PaymentIncoming / PaymentInbound PaymentClaimed -> PaymentReceived?
PaymentClaimable? But I'm fine with all the above too^
Ah, that's even better! Now the only thing is that the migration PaymentClaimed->PaymentReceived might be a pitfall for users as their code for the former PaymentReceived event might just keep on working for the wrong event without them noticing.
Activity
TheBlueMatt commentedon Nov 30, 2022
LDKLite should just expose
PaymentClaimed, ie that we have received and claimed a payment, notPaymentReceived, which it should just handle by calling claim_payment.tnull commentedon Nov 30, 2022
Yes, this is also what I'm leaning towards, only issue being that I find
PaymentReceiveda much more intuitive name to use for this event in LDK Lite, which however would shadow the upstream event with different meaning, i.e., would be pretty confusing if someone is aware of LDK Events already. I'll have to think about whether there is a good alternative naming for it.For the record, I'd find using something along the lines of
PaymentIncoming/PaymentReceivedalso more intuitive thanPaymentReceived/PaymentClaimedupstream, sincePaymentReceivedsounds pretty final by itself, even though it's actually not.valentinewallace commentedon Nov 30, 2022
+1, I've gotten similar feedback about
PaymentReceivedbeing a confusing nametnull commentedon Nov 30, 2022
Thanks, good to know, then maybe the solution could indeed be renaming the upstream event..
TheBlueMatt commentedon Nov 30, 2022
Any suggestions for a better one? We should totally rename it upstream if it makes sense.
tnull commentedon Nov 30, 2022
As mentioned above (in an edit), maybe something along the lines of
PaymentReceived->PaymentIncoming/PaymentInboundPaymentClaimed->PaymentReceived?valentinewallace commentedon Nov 30, 2022
PaymentClaimable? But I'm fine with all the above too^TheBlueMatt commentedon Nov 30, 2022
Any of those SGTM, feel free to PR :)
tnull commentedon Nov 30, 2022
Ah, that's even better! Now the only thing is that the migration
PaymentClaimed->PaymentReceivedmight be a pitfall for users as their code for the formerPaymentReceivedevent might just keep on working for the wrong event without them noticing.TheBlueMatt commentedon Nov 30, 2022
Maybe after #1886 tho.
tnull commentedon Nov 30, 2022
Alright, will open a PR tomorrow/in the next days!
tnull commentedon Dec 1, 2022
Closing as clarified, will update after upstream event has been merged.
Merge pull request lightningdevkit#34 from dzdidi/main