if end > range_start && start < range_end { let overlap_start = start.max(range_start); let overlap_end = end.min(range_end); result.push(FindRangeOutput { start: overlap_start, size: overlap_end - overlap_start, satpoint: SatPoint { outpoint: Entry::load(*outpoint_entry.value()), offset: offset + overlap_start - start, }, }); remaining_sats -= overlap_end - overlap_start; if remaining_sats == 0 { break; } } offset += end - start; } } Ok(Some(result)) } fn list_inner(&self, outpoint: OutPointValue) -> Result>> { Ok( self .database .begin_read()? .open_table(OUTPOINT_TO_SAT_RANGES)? .get(&outpoint)? .map(|outpoint| outpoint.value().to_vec()), ) } pub(crate) fn list(&self, outpoint: OutPoint) -> Result> { if !self.index_sats || outpoint == unbound_outpoint() {