-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Part 5|*] Thread Contexts through payment methods Part 1 #10307
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
Open
ziggie1984
wants to merge
49
commits into
lightningnetwork:elle-payment-sql-series-new
Choose a base branch
from
ziggie1984:introduce-sql-schema-payments-part-5
base: elle-payment-sql-series-new
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Part 5|*] Thread Contexts through payment methods Part 1 #10307
ziggie1984
wants to merge
49
commits into
lightningnetwork:elle-payment-sql-series-new
from
ziggie1984:introduce-sql-schema-payments-part-5
+5,403
−492
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We prepare the code for the sql payment backend. However no payment db interface method for the sql backend is implemented yet. This will be done in the following commits. They currently use the embedded KVStore to satify the build environment.
This does not include duplicate payments yet. They will be added when the migration code is introduced for payments.
We allow the migration of the payment schema to be applied when the test_native_sql is active to make sure the tables are properly contructed.
…l-schema-payments [Part 1|3] Introduce SQL Payment schema into LND
283469a to
bc81c3a
Compare
This was referenced Oct 21, 2025
Previously a one(intent)-to-many(payment) relationship it is now changed to a one-to-one relationship because a payment request only can have 1 payment related to it. Looking into the future with BOLT12 offers, the fetched invoice from the offer could be stored here as well and the relationship would still hold.
In this commit we add all queries which we will need to insert payment related data into the db.
We make the QueryPayments test db agnostic and also keep a small test for querying the duplicate payments case in the kv world.
Now that every method of the interface was implemented we can remove the embedded reference to the KVStore.
We now test every test in the payment_test.go file against all databases.
bc81c3a to
7e6cabd
Compare
e991cd0 to
6860702
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Builds on top of the latest payment SQL changes and threads the context through payment functions.
This is part 1, as we can thread the context even further up the stack which will be done in Part 2