fix scrypt worker.
This commit is contained in:
parent
b81a6b3ea1
commit
84b94fd1b5
@ -1200,7 +1200,7 @@ HDPrivateKey.prototype.fromSeed = function fromSeed(seed, network) {
|
||||
this.childIndex = 0;
|
||||
this.chainCode = right;
|
||||
this.privateKey = left;
|
||||
this.publicKey = ec.publicKeyCreate(this.privateKey, true);
|
||||
this.publicKey = ec.publicKeyCreate(left, true);
|
||||
|
||||
return this;
|
||||
};
|
||||
@ -1259,7 +1259,7 @@ HDPrivateKey.prototype.fromKey = function fromKey(key, entropy, network) {
|
||||
this.childIndex = 0;
|
||||
this.chainCode = entropy;
|
||||
this.privateKey = key;
|
||||
this.publicKey = ec.publicKeyCreate(this.privateKey, true);
|
||||
this.publicKey = ec.publicKeyCreate(key, true);
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
@ -329,7 +329,7 @@ function Worker(id) {
|
||||
|
||||
this.child.onerror = function onerror(err) {
|
||||
self.emit('error', err);
|
||||
self.emit('exit', 1, null);
|
||||
self.emit('exit', -1, null);
|
||||
};
|
||||
|
||||
this.child.onmessage = function onmessage(event) {
|
||||
@ -802,7 +802,7 @@ jobs.mine = function mine(attempt) {
|
||||
|
||||
jobs.scrypt = function scrypt(passwd, salt, N, r, p, len) {
|
||||
var scrypt = require('./scrypt');
|
||||
return scrypt(passwd, salt, N, r, p, len);
|
||||
return scrypt(passwd, salt, N >>> 0, r >>> 0, p >>> 0, len);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user