mulit: move payment query code to separate file
We also rename the struct since it is now in its own package there is no need to prefix it.
This commit is contained in:
5 files changed
+92
-91
No files matched your search
@@ -1131,9 +1131,9 @@ func fetchFailedHtlcKeys(bucket kvdb.RBucket) ([][]byte, error) {
|
||||
// to a subset of payments by the payments query, containing an offset
|
||||
// index and a maximum number of returned payments.
|
||||
func (p *KVPaymentsDB) QueryPayments(_ context.Context,
|
||||
query PaymentsQuery) (PaymentsResponse, error) {
|
||||
query Query) (Response, error) {
|
||||
|
||||
var resp PaymentsResponse
|
||||
var resp Response
|
||||
|
||||
if err := kvdb.View(p.db, func(tx kvdb.RTx) error {
|
||||
// Get the root payments bucket.
|
||||
@@ -1247,7 +1247,7 @@ func (p *KVPaymentsDB) QueryPayments(_ context.Context,
|
||||
|
||||
return nil
|
||||
}, func() {
|
||||
resp = PaymentsResponse{}
|
||||
resp = Response{}
|
||||
}); err != nil {
|
||||
return resp, err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user