MCPcopy Create free account
hub / github.com/ElementsProject/lightning / adjacent_after

Function adjacent_after

devtools/bolt-coverage.py:157–163  ·  view source on GitHub ↗

All records whose covered range starts closest to (but not before) gap_end.

(records: List[CovRecord], gap_end: int)

Source from the content-addressed store, hash-verified

155
156
157def adjacent_after(records: List[CovRecord], gap_end: int) -> List[CovRecord]:
158 """All records whose covered range starts closest to (but not before) gap_end."""
159 candidates = [r for r in records if r[1] >= gap_end]
160 if not candidates:
161 return []
162 min_start = min(r[1] for r in candidates)
163 return [r for r in candidates if r[1] == min_start]
164
165
166def snippet(text: str, start: int, end: int, tail: bool = False, maxlen: int = 60) -> str:

Callers 1

show_gapsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected