Commit 3f1ee1e
authored
fix(gossipsub): don't panic on mcache while adding fanout peers
Fanout peers may not be been added correctly because the scoring function was not negated. This PR changes it to be more consistent with other parts of the code base.
Also, users can set the memcache size to be 0. When this happens, a few panics occur. I've added statements to prevent this.
Pull-Request: #6095.1 parent 6e729d9 commit 3f1ee1e
3 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2473 | 2473 | | |
2474 | 2474 | | |
2475 | 2475 | | |
2476 | | - | |
2477 | | - | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
2478 | 2480 | | |
2479 | 2481 | | |
2480 | 2482 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
| |||
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
190 | 197 | | |
191 | 198 | | |
192 | 199 | | |
| |||
0 commit comments