Fix naming

This commit is contained in:
Kagami Hiiragi 2015-01-10 16:03:14 +03:00
parent 53f38be9ed
commit e562fbf645
4 changed files with 5 additions and 5 deletions

View File

@ -57,7 +57,7 @@ var FAILBACK_POOL_SIZE = 8;
// <http://caniuse.com/#feat=promises>) and we can use only new browsers
// because of the WebCryptoAPI (see
// <http://caniuse.com/#feat=cryptography>).
exports.doPOW = function(opts) {
exports.pow = function(opts) {
// Try to get CPU cores count otherwise fallback to default value.
// Currenty navigator's concurrency property available in Chrome and
// not available in Firefox; hope default value won't slow down POW

View File

@ -51,7 +51,7 @@ exports.getTarget = function(opts) {
return target;
};
exports.doPOW = function(opts) {
exports.pow = function(opts) {
var poolSize = opts.poolSize || os.cpus().length;
// Check all input params prematurely to not let promise executor or

View File

@ -91,5 +91,5 @@ exports.do = function(opts) {
initialHash = opts.initialHash;
}
opts = objectAssign({}, opts, {initialHash: initialHash});
return platform.doPOW(opts);
return platform.pow(opts);
};

View File

@ -3,7 +3,7 @@
#include <stdlib.h>
#include "./pow.h"
#define MAX_SAFE_JS_INTEGER 9007199254740991
#define MAX_SAFE_INTEGER 9007199254740991
using node::Buffer;
using v8::Handle;
@ -34,7 +34,7 @@ class PowWorker : public NanAsyncWorker {
// here, so everything we need for input and output
// should go on `this`.
void Execute () {
error = pow(pool_size, target, initial_hash, MAX_SAFE_JS_INTEGER, &nonce);
error = pow(pool_size, target, initial_hash, MAX_SAFE_INTEGER, &nonce);
}
// Executed when the async work is complete