-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Refactor Payment PR 3 #9844
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
base: master
Are you sure you want to change the base?
Refactor Payment PR 3 #9844
Conversation
Important Review skippedAuto reviews are limited to specific labels. 🏷️ Labels to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
50f580b
to
90108ed
Compare
90108ed
to
daced8b
Compare
In the following commits we will gradually unify the current payment db operations into an interface to later down the road support both backends (sql+kv).
We move all code from the payment_control.go into payments.go so that for later commits we can easily have all payment db related kv db code together.
We also addd this new db on the server level to use it in the following commit to do all the payment related queries of the rpcserver. We add a new payment db instance on the server level. Which we will you for the payment related queries in a following commit.
All interactions related to the payment db are now part of the kvPaymentDB struct.
8658c85
to
b308ed0
Compare
We add a context for the query method because the query method will be part of the paymentDB interface and for the SQL case we need the context for this method. So we add it here as well although it is not used similar to the invoice design.
We add a new payments package and create a db interface for the paymentDB there. This is already implemented for the KV db side and will be implemented for the SQL side in future PRS.
b308ed0
to
3a573e0
Compare
Depends on #9825 and #9826
We introduce the new package
payments
and add a new paymentDB interface which is already implemented on the kvdb side via KVPaymentDB.