diff --git a/kv/kv_interface.go b/kv/kv_interface.go index ee62c91fa..c79c2e187 100644 --- a/kv/kv_interface.go +++ b/kv/kv_interface.go @@ -61,6 +61,9 @@ import ( const ReadersLimit = 32000 // MDBX_READERS_LIMIT=32767 +// const Unbounded []byte = nil +const Unlim int = -1 + var ( ErrAttemptToDeleteNonDeprecatedBucket = errors.New("only buckets from dbutils.ChaindataDeprecatedTables can be deleted") diff --git a/kv/mdbx/kv_mdbx_test.go b/kv/mdbx/kv_mdbx_test.go index 8c96fdabe..6fac3a222 100644 --- a/kv/mdbx/kv_mdbx_test.go +++ b/kv/mdbx/kv_mdbx_test.go @@ -126,7 +126,7 @@ func TestRange(t *testing.T) { _, tx, _ := BaseCase(t) //[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.True(t, it.HasNext()) k, v, err := it.Next()