Commit 08e6252
committed
Fixed a check for non-zero weight when allocating rewards
We expect the pool weight to be non-zero so that we do not allocate rewards to
an empty pool. The condition checking `currentPoolWeight >= 0` was incorrect
given `== 0` case is exactly what we want to avoid. The transaction would fail
later on `totalAmount / currentPoolWeight` but human-readable revert was the
intention of this `require` check.1 parent edf4690 commit 08e6252
2 files changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
283 | 290 | | |
284 | 291 | | |
285 | 292 | | |
| |||
0 commit comments