Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speedup payment_received notifications: Fetch single pay from GL instead of full sync() #813

Open
ok300 opened this issue Feb 23, 2024 · 2 comments

Comments

@ok300
Copy link
Contributor

ok300 commented Feb 23, 2024

Processing a payment_received notification involves a sync().

[com.cBreez.client.BreezForegroundService] {INFO} (2024-02-23 12:57:34.763) : pull changed since 1708689097

The filtering by since timestamp happens locally, after the full list of payments is retrieved from GL.

Fortunately, listpays allows for filtering by payment_hash. Calling it this way would only fetch data for a single payment, speeding up the processing of payment_received notifications significantly.

listpay docs: https://docs.corelightning.org/reference/lightning-listpays

@roeierez
Copy link
Member

roeierez commented Apr 7, 2024

Currently we get the payment from the INVOICE_PAID event and persist it without using even sync.
@ok300 Do we need to do anything here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants