fetch inbound data on demand to speedup and fix inbound bisection

This is an attempt to download inbound data in a lazy way.
Should this be:

range_to_update = set(range_min + range_max)

?