-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Refactor Payment PR 4 #9847
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
Refactor Payment PR 4 #9847
Changes from all commits
4bb21a7
77a6b57
03af985
d77b2f9
d138e23
df9bac2
e24ae0d
2b856f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -203,11 +203,13 @@ var ( | |
| migration: mig.CreateTLB(payAddrIndexBucket), | ||
| }, | ||
| { | ||
| // Initialize payment index bucket which will be used | ||
| // to index payments by sequence number. This index will | ||
| // be used to allow more efficient ListPayments queries. | ||
| number: 15, | ||
| migration: mig.CreateTLB(paymentsIndexBucket), | ||
| // This used to be create payment related top-level | ||
| // buckets, however this is now done by the payment | ||
| // package. | ||
| number: 15, | ||
| migration: func(tx kvdb.RwTx) error { | ||
| return nil | ||
| }, | ||
| }, | ||
| { | ||
| // Add our existing payments to the index bucket created | ||
|
|
@@ -450,7 +452,6 @@ var dbTopLevelBuckets = [][]byte{ | |
| invoiceBucket, | ||
| payAddrIndexBucket, | ||
| setIDIndexBucket, | ||
| paymentsIndexBucket, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does it mean we no longer init the payments db in
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. exactly we have a separate init method now in the kv store =>
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And the wipe method was only used in tests, which did not affect the payment related data and I don't think we currently need a wipe test on the paymentsdb package side, because the test seems not really necessary imo. |
||
| peersBucket, | ||
| nodeInfoBucket, | ||
| metaBucket, | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions
deserializeTimeandserializeTimeare added here, but they also exist in the newpayments/db/codec.gofile. This appears to be code duplication introduced during the refactoring. Since these functions are related to payment serialization and are used within the newpaymentspackage, they should likely only reside inpayments/db/codec.go. Please remove the duplicated functions from this file.