multi: rename ReadCursor to RCursor

This commit is contained in:
Conner Fromknecht 2020-05-06 15:50:14 -07:00
parent 455ddfebdb
commit ef9068319b
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
2 changed files with 4 additions and 4 deletions

View File

@ -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()
}

View File

@ -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.