Commit c309d50
committed
staking:
- Add check to DisputeManager to avoid accepting disputes of indexers with zero tokens to slash
- Add check to Staking to avoid slashing zero tokens
- Add check to Staking to avoid staking zero tokens
- Add check in Rebates calculation to avoid division by zero when no fees in rebate pool
- Improve check in Staking contract `settle()` when comparing allocation channelID
- Allow to claim a zero tokens settlement from the rebate pool
- Fix comment in test helpers config
- Add tests for all of the above1 parent 0a4216d commit c309d50
File tree
6 files changed
+271
-134
lines changed- contracts
- libs
- test
- lib
- staking
6 files changed
+271
-134
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
295 | 297 | | |
296 | 298 | | |
297 | | - | |
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
| |||
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| 341 | + | |
| 342 | + | |
340 | 343 | | |
341 | 344 | | |
342 | 345 | | |
343 | 346 | | |
344 | 347 | | |
| 348 | + | |
345 | 349 | | |
346 | 350 | | |
347 | 351 | | |
| |||
474 | 478 | | |
475 | 479 | | |
476 | 480 | | |
477 | | - | |
478 | 481 | | |
479 | | - | |
| 482 | + | |
480 | 483 | | |
481 | 484 | | |
482 | 485 | | |
483 | 486 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
491 | 497 | | |
492 | 498 | | |
493 | 499 | | |
| |||
527 | 533 | | |
528 | 534 | | |
529 | 535 | | |
530 | | - | |
531 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
532 | 541 | | |
533 | 542 | | |
534 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
400 | 410 | | |
401 | | - | |
| 411 | + | |
402 | 412 | | |
403 | 413 | | |
404 | 414 | | |
| |||
416 | 426 | | |
417 | 427 | | |
418 | 428 | | |
419 | | - | |
| 429 | + | |
420 | 430 | | |
421 | 431 | | |
422 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
0 commit comments