Guarantee that makers can't be added to pools when max amount decreases
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user