Commit affc8b4
committed
fix: remove redundant subgraphAllocatedTokens check (TRST-R-3)
In _updateSubgraphRewards(), the check `subgraphAllocatedTokens != 0`
is redundant: if undistributedRewards != 0 then condition == NONE,
and _getSubgraphRewardsState() guarantees subgraphAllocatedTokens != 0
when condition is NONE (otherwise it sets NO_ALLOCATION which triggers
reclaim above, zeroing undistributedRewards).
Also fixes inaccurate NatSpec on _getSubgraphRewardsState return value.1 parent 22954a4 commit affc8b4
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
0 commit comments