Commit f12e451
authored
snapshots: fix filesByRange (erigontech#9472) (erigontech#9489)
The method was iterating over snapshots.segments.Min().segments, but
passing the index to view.Segments().
This might lead to a crash, because those 2 collections are different,
and the indexes might not match.
view.Segments() only contains the snapshot files that are fully
downloaded and indexed.
The code is changed to only use the view files (as it was before).1 parent ab1ee7b commit f12e451
2 files changed
Lines changed: 28 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
328 | 337 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2143 | 2143 | | |
2144 | 2144 | | |
2145 | 2145 | | |
| 2146 | + | |
2146 | 2147 | | |
2147 | 2148 | | |
2148 | 2149 | | |
2149 | | - | |
2150 | | - | |
2151 | | - | |
2152 | | - | |
2153 | | - | |
2154 | | - | |
2155 | | - | |
2156 | | - | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
2157 | 2153 | | |
2158 | | - | |
2159 | | - | |
2160 | | - | |
2161 | | - | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
2162 | 2163 | | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
2163 | 2169 | | |
2164 | 2170 | | |
2165 | | - | |
| 2171 | + | |
2166 | 2172 | | |
2167 | 2173 | | |
2168 | 2174 | | |
| |||
0 commit comments