mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 12:01:20 +00:00
add constant kv.Unlim=-1 (#955)
This commit is contained in:
parent
a4034d5cea
commit
0b9404adb8
@ -61,6 +61,9 @@ import (
|
|||||||
|
|
||||||
const ReadersLimit = 32000 // MDBX_READERS_LIMIT=32767
|
const ReadersLimit = 32000 // MDBX_READERS_LIMIT=32767
|
||||||
|
|
||||||
|
// const Unbounded []byte = nil
|
||||||
|
const Unlim int = -1
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ErrAttemptToDeleteNonDeprecatedBucket = errors.New("only buckets from dbutils.ChaindataDeprecatedTables can be deleted")
|
ErrAttemptToDeleteNonDeprecatedBucket = errors.New("only buckets from dbutils.ChaindataDeprecatedTables can be deleted")
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ func TestRange(t *testing.T) {
|
|||||||
_, tx, _ := BaseCase(t)
|
_, tx, _ := BaseCase(t)
|
||||||
|
|
||||||
//[from, to)
|
//[from, to)
|
||||||
it, err := tx.RangeDescend("Table", []byte("key3"), []byte("key1"), -1)
|
it, err := tx.RangeDescend("Table", []byte("key3"), []byte("key1"), kv.Unlim)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
require.True(t, it.HasNext())
|
require.True(t, it.HasNext())
|
||||||
k, v, err := it.Next()
|
k, v, err := it.Next()
|
||||||
|
Loading…
Reference in New Issue
Block a user