This change avoids many superfluous data copies and lookups by
exploiting `withValue` thus performing only one lookup with the same key
(instead of hasKey + actual lookup).
We also avoid several copies of the value which often is copied even
though only the next/prev pointers from the item are needed, for examle
during shifting and lru-appending.
why:
Clarify pre-conditions needed for `lruAppend()` to work properly. In a
nutshell, it needs to be used in concert with `lruFetch()` or
`lruUpdate()`.
* Added `IntervalSet`, sets of non-adjacent intervals
Relocated from nimbus-eth1 snap sync development
* Fix local import directive
* Fix --styleCheck complaints
* Attempt to get around CI problem by varying items
details:
Vary all_tests exec list
Hide useless globalness of `noisy` constant in non-debugging mode
* Re-route KeyError exceptions as Defect for all except the `[]` function
why:
Access via key is verified, error is returned via Result[]
* Refactor lruFetch() item rotation
why:
Previously, the item was deleted and re-inserted in the table although
for rotation, only the queue links need to be updated.
* Delete some KeyError annotations
why:
Was overlooked earlier
* More KeyError fixes