You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because we're doing the storage iEpoch = epochs[userEpoch] assignment inside of for (...) that assignment happens only once. Meaning for every iteration, we're updating the same epoch object.
Instead we need to update the storage pointer with every iteration.
The fix for this issue should include a test that proofs it's working as intended.
The text was updated successfully, but these errors were encountered:
Something we've discovered recently.
There's a bug in the
for
loop we use inprocessAccount
.Namely this line:
https://github.com/logos-co/staking/blob/develop/contracts/StakeManager.sol#L444
Because we're doing the
storage iEpoch = epochs[userEpoch]
assignment inside offor (...)
that assignment happens only once. Meaning for every iteration, we're updating the same epoch object.Instead we need to update the storage pointer with every iteration.
The fix for this issue should include a test that proofs it's working as intended.
The text was updated successfully, but these errors were encountered: