channeldb: add context to query method
We add a context for the query method because the query method is part of the paymentDB interface and for the SQL case we will need the context for this method because the native SQL drivers demand one. So we add it for the kv implementation here as well so we can then make use of the new interface type.
This commit is contained in:
3 files changed
+21
-16
No files matched your search
@@ -2,6 +2,7 @@ package channeldb
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
@@ -1206,8 +1207,8 @@ func fetchFailedHtlcKeys(bucket kvdb.RBucket) ([][]byte, error) {
|
||||
// QueryPayments is a query to the payments database which is restricted
|
||||
// to a subset of payments by the payments query, containing an offset
|
||||
// index and a maximum number of returned payments.
|
||||
func (p *KVPaymentsDB) QueryPayments(query PaymentsQuery) (PaymentsResponse,
|
||||
error) {
|
||||
func (p *KVPaymentsDB) QueryPayments(_ context.Context,
|
||||
query PaymentsQuery) (PaymentsResponse, error) {
|
||||
|
||||
var resp PaymentsResponse
|
||||
|
||||
|
||||
Reference in new issue
Block a user