Commit 9eafb14
committed
fix(epp): keep metadata-less endpoints out of the p2p source maximum
The max-tracking loop counted endpoints the candidate loop later rejects
for nil metadata, so a metadata-less endpoint reporting the pool's
highest cached-token count inflated the maximum, every real endpoint
fell outside the one-block band, and the source header was silently
never set. One pass now collects usable sources and the maximum
together, which also computes each endpoint's cached tokens once.
Signed-off-by: nilig <nili.ifergan@gmail.com>1 parent 6d21df7 commit 9eafb14
2 files changed
Lines changed: 42 additions & 7 deletions
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
164 | 172 | | |
| 173 | + | |
165 | 174 | | |
166 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
167 | 184 | | |
168 | 185 | | |
169 | 186 | | |
| |||
174 | 191 | | |
175 | 192 | | |
176 | 193 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 194 | + | |
| 195 | + | |
180 | 196 | | |
181 | 197 | | |
182 | | - | |
183 | | - | |
184 | | - | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
185 | 201 | | |
186 | 202 | | |
187 | 203 | | |
| |||
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
144 | 163 | | |
145 | 164 | | |
146 | 165 | | |
| |||
0 commit comments