Guarantee that makers can't be added to pools when max amount decreases

This commit is contained in:
Amir Bandeali
2019-09-19 21:07:43 -07:00
parent cc67f732e1
commit a340c817c9

View File

@@ -177,7 +177,9 @@ contract MixinStakingPoolMakers is
}
// Is the pool already full?
if (pool.numberOfMakers == maximumMakersInPool) {
// NOTE: If maximumMakersInPool is decreased below the number of makers currently in a pool,
// the pool will no longer be able to add more makers.
if (pool.numberOfMakers >= maximumMakersInPool) {
LibRichErrors.rrevert(LibStakingRichErrors.MakerPoolAssignmentError(
LibStakingRichErrors.MakerPoolAssignmentErrorCodes.PoolIsFull,
makerAddress,