diff --git a/channeldb/invoices.go b/channeldb/invoices.go index 654b70cd..aea8ae30 100644 --- a/channeldb/invoices.go +++ b/channeldb/invoices.go @@ -715,7 +715,7 @@ func (d *DB) QueryInvoices(q InvoiceQuery) (InvoiceSlice, error) { // keyForIndex is a helper closure that retrieves the invoice // key for the given add index of an invoice. - keyForIndex := func(c kvdb.ReadCursor, index uint64) []byte { + keyForIndex := func(c kvdb.RCursor, index uint64) []byte { var keyIndex [8]byte byteOrder.PutUint64(keyIndex[:], index) _, invoiceKey := c.Seek(keyIndex[:]) @@ -724,7 +724,7 @@ func (d *DB) QueryInvoices(q InvoiceQuery) (InvoiceSlice, error) { // nextKey is a helper closure to determine what the next // invoice key is when iterating over the invoice add index. - nextKey := func(c kvdb.ReadCursor) ([]byte, []byte) { + nextKey := func(c kvdb.RCursor) ([]byte, []byte) { if q.Reversed { return c.Prev() } diff --git a/channeldb/kvdb/interface.go b/channeldb/kvdb/interface.go index 90d2dfa9..16e84285 100644 --- a/channeldb/kvdb/interface.go +++ b/channeldb/kvdb/interface.go @@ -85,10 +85,10 @@ type Driver = walletdb.Driver // database) that is only allowed to perform read operations. type RBucket = walletdb.ReadBucket -// ReadCursor represents a bucket cursor that can be positioned at the start or +// RCursor represents a bucket cursor that can be positioned at the start or // end of the bucket's key/value pairs and iterate over pairs in the bucket. // This type is only allowed to perform database read operations. -type ReadCursor = walletdb.ReadCursor +type RCursor = walletdb.ReadCursor // RTx represents a database transaction that can only be used for reads. If // a database update must occur, use a RwTx.