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:
ziggie committed 2025-08-14 19:53:18 +02:00
1 parent 03af9858d2
commit d77b2f9c26
5 files changed
+92 -91

No files matched your search

+3 -3
View File
@@ -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
}