Skip to content
This repository was archived by the owner on Oct 30, 2018. It is now read-only.

Bugfix/openprocess #121

Merged
merged 5 commits into from
May 5, 2017
Merged

Bugfix/openprocess #121

merged 5 commits into from
May 5, 2017

Conversation

GalumphingCallooh
Copy link
Contributor

Bugfix for single CPU cores. Can add a share now without warnings.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling aa5c642 on MrFancyMonocle:bugfix/openprocess into bf978db on Storj:master.

@@ -83,8 +83,8 @@ class RPC {
start(configPath, callback, unsafeFlag=false) {
let config = null;

if (this.shares.size + 1 >= cpus().length && !unsafeFlag) {
return callback(new Error('insufficient system resources available'));
if (this.shares.size >= cpus().length && !unsafeFlag) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a single core system this will still throw an error
1 farmer >= 1 core
it should be
1 farmer > 1 core

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so; this is in the start function so, by the end, it's modifying the state from 0 shares to +1 shares. Comparison is 0 farmers >= 1 core, unless I'm chasing my state management tail somewhere here.

@161chihuahuas 161chihuahuas merged commit b054c27 into storj-archived:master May 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants