This PR removes the require statements in BondingManager.pendingStake() and BondingManager.pendingFees(). Instead of validating the _endRound argument using a require statement, both functions will now execute pending stake/fee calculations through the current round if _endRound > currentRound. If the _endRound <= delegator.lastClaimRound, the loop that executes the calculations will not run and pendingStake() will return delegator.bondedAmount and pendingFees() will return delegator.fees.
This PR removes the require statements in
BondingManager.pendingStake()
andBondingManager.pendingFees()
. Instead of validating the_endRound
argument using a require statement, both functions will now execute pending stake/fee calculations through the current round if_endRound > currentRound
. If the_endRound <= delegator.lastClaimRound
, the loop that executes the calculations will not run andpendingStake()
will returndelegator.bondedAmount
andpendingFees()
will returndelegator.fees
.Fixes #363