Skip to content

compute limit for a pool is computeLimit - 1 #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
outwrit opened this issue Mar 27, 2025 · 1 comment · Fixed by #38
Closed

compute limit for a pool is computeLimit - 1 #36

outwrit opened this issue Mar 27, 2025 · 1 comment · Fixed by #38

Comments

@outwrit
Copy link
Contributor

outwrit commented Mar 27, 2025

When joining a compute pool it looks like the computeLimit check is off by one, making the real compute limit computeLimit - 1:

require(addedCompute < pools[poolId].computeLimit, "ComputePool: pool is at capacity");

Could be changed to:

require(addedCompute <= pools[poolId].computeLimit, "ComputePool: pool is at capacity");
@manveerxyz
Copy link
Member

Thanks for flagging! Feel free to submit a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants