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

Add OutgoingPaymentsDb interface #117

Merged
merged 5 commits into from
Nov 26, 2020
Merged

Add OutgoingPaymentsDb interface #117

merged 5 commits into from
Nov 26, 2020

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Nov 25, 2020

We split payments into two parts: a top-level payment description and a list of partial payments (corresponding to the actual HTLCs that are sent). This allows storing them in different tables to avoid duplicating data. It also makes it easier in the future to implement different payment types (swaps, keysend, etc).

Notes:

  • I'd like reviewers to focus mostly on the PaymentsDb file: the rest is implementation details
  • we will need to figure out the serialization of these objects in the DB: it can either be done entirely in phoenix-kmm with SQL, but if that helps we can implement binary serialization of some fields (for example errors) in eclair-kmp, let met know

@t-bast t-bast requested a review from dpad85 November 25, 2020 16:19
We split payments into two parts: a top-level payment description and
a list of partial payments (corresponding to the actual HTLCs that are sent).
This test suite should run against the SQL implementation as well to verify
its correctness.
@t-bast t-bast marked this pull request as ready for review November 26, 2020 10:01
The result is more future-proof and will make it possible to handle many
different types of payments cleanly (swaps, pay-to-open, keysend, etc).
@t-bast
Copy link
Member Author

t-bast commented Nov 26, 2020

I've made many changes to the IncomingPaymentsDb interface (based on our offline discussions), I think this result is really nice and future-proof now.

@t-bast t-bast requested a review from dpad85 November 26, 2020 16:53
Copy link
Member

@dpad85 dpad85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@t-bast t-bast merged commit bd83b23 into master Nov 26, 2020
@t-bast t-bast deleted the outgoing-payments-db branch November 26, 2020 19:17
@t-bast t-bast mentioned this pull request Nov 27, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants