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

Optimize keysend/multikeysend balance checks #452

Closed
kiwiidb opened this issue Nov 23, 2023 · 1 comment
Closed

Optimize keysend/multikeysend balance checks #452

kiwiidb opened this issue Nov 23, 2023 · 1 comment
Assignees

Comments

@kiwiidb
Copy link
Contributor

kiwiidb commented Nov 23, 2023

Currently, we do a CheckPaymentAllowed for every split in the multikeysend.

This can put a lot of pressure on the database when someone with a large account is doing a lot of multikeysend requests.
We could move the CheckPaymentAllowed check one level up, into both the KeySend and MultiKeySend controller methods. For the MultiKeysend, we can create a "synthetic" LNPayReq object with the amount being the total amount in the multikeysend request. Like this we can decrease the load on the database significantly.

@kiwiidb
Copy link
Contributor Author

kiwiidb commented Nov 27, 2023

fixed in #454

@kiwiidb kiwiidb closed this as completed Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants