Skip to content
This repository has been archived by the owner on May 12, 2018. It is now read-only.

Commit

Permalink
Prepare for the cn heavy release.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrheinen committed Apr 11, 2018
1 parent ea79889 commit 05a284e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
12 changes: 3 additions & 9 deletions lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var log = function(severity, system, text, data){
global.log(severity, system, threadId + text, data);
};

var cryptoNight = multiHashing['cryptonight'];
var cryptoNight = multiHashing['cryptonight_heavy'];

var diff1 = bignum('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 16);

Expand Down Expand Up @@ -589,17 +589,11 @@ function handleMinerMethod(method, params, ip, portData, sendReply, pushMessage)
}
}

// Check that the address prefix is sane.
var addressPrefix = cnUtil.address_decode(new Buffer(login)).toString();
if (config.poolServer.allowedMinerAddressPrefixes.indexOf(addressPrefix) == -1) {
sendReply('invalid address used');
return;
}

var minerId = utils.uid();
miner = new Miner(minerId, login, workerName, params.pass, ip, difficulty, noRetarget, pushMessage);
connectedMiners[minerId] = miner;

sendReply(null, {
id: minerId,
job: miner.getJob(),
Expand Down Expand Up @@ -820,7 +814,7 @@ function startPoolServerTcp(callback){
});
}
else {
net.createServer(socketResponder).listen(portData.port, function (error, result) {
net.createServer(socketResponder).listen(portData.port, '127.0.0.1', function (error, result) {
if (error) {
log('error', logSystem, 'Could not start server listening on port %d, error: $j', [portData.port, error]);
cback(true);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"dateformat": "*",
"base58-native": "*",
"mailgun.js": "*",
"multi-hashing": "git://github.com/clintar/node-multi-hashing.git#Nan-2.0",
"cryptonote-util": "git://github.com/M5M400/node-cryptonote-util.git#xmr-Nan-2.0"
"multi-hashing": "git://github.com/quangvu3/node-multi-hashing.git#Nan-2.0",
"cryptonote-util": "git://github.com/SadBatman/node-cryptonote-util.git#xdn-Nan-2.0"
},
"engines": {
"node": ">=4.0"
Expand Down

0 comments on commit 05a284e

Please sign in to comment.