mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
multi: rename ReadCursor to RCursor
This commit is contained in:
parent
455ddfebdb
commit
ef9068319b
@ -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()
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user