I know this a fork of MCV2 and we don't need to make all these changes, but they help me in terms of readability and conciseness of logic. If we don't want to make these changes I honestly don't mind, but here's what I did in case y'all think it's worth it:
renamed some functions to be more descriptive
added some combined operators (+=, +-) where applicable
added some newlines to separate logical chunks in functions where everything was tightly scrunched together
calculated millisSinceReward as the difference of _timeStamp() and pool.lastRewardTime beforehand and used that as the loop condition--instead of checking _timeStamp() > pool.lastRewardTime in the loop condition, and then calculating millisSinceReward within the loop. I think I did this in 2 places.
deposit() is the next function I'm looking at but I don't fully understand the logic in there so will try to have some slack discussions around that first before I make changes in there.
I know this a fork of MCV2 and we don't need to make all these changes, but they help me in terms of readability and conciseness of logic. If we don't want to make these changes I honestly don't mind, but here's what I did in case y'all think it's worth it:
millisSinceReward
as the difference of_timeStamp()
andpool.lastRewardTime
beforehand and used that as the loop condition--instead of checking_timeStamp() > pool.lastRewardTime
in the loop condition, and then calculatingmillisSinceReward
within the loop. I think I did this in 2 places.deposit() is the next function I'm looking at but I don't fully understand the logic in there so will try to have some slack discussions around that first before I make changes in there.