Compare commits

..

No commits in common. "533f0f346eb5ec07c0e90f99f5f9e51871226333" and "4f298c3ead7651646c27a30601fcdbf6512b367a" have entirely different histories.

6 changed files with 14 additions and 41 deletions

View File

@ -50,8 +50,6 @@ Features
* ✓ __Quark__ (Quarkcoin [QRK])
* ✓ __X11__ (Darkcoin [DRK], Hirocoin, Limecoin)
* ✓ __X13__ (MaruCoin, BoostCoin)
* ✓ __X16R__ (PexaCoin, RavenCoin)
* ✓ __X16RV2__ (PexaCoin, RavenCoin)
* ✓ __NIST5__ (Talkcoin)
* ✓ __Keccak__ (Maxcoin [MAX], HelixCoin, CryptoMeth, Galleon, 365coin, Slothcoin, BitcointalkCoin)
* ✓ __Skein__ (Skeincoin [SKC])

View File

@ -73,7 +73,6 @@ var algos = module.exports = global.algos = {
}
}
},
sha1: {
hash: function(){
return function(){
@ -109,22 +108,6 @@ var algos = module.exports = global.algos = {
}
}
},
x16r: {
multiplier: Math.pow(2, 8),
hash: function(){
return function(){
return multiHashing.x16r.apply(this, arguments);
}
}
},
x16rv2: {
multiplier: Math.pow(2, 8),
hash: function(){
return function(){
return multiHashing.x16rv2.apply(this, arguments);
}
}
},
nist5: {
hash: function(){
return function(){
@ -162,14 +145,6 @@ var algos = module.exports = global.algos = {
}
}
},
neoscrypt: {
multiplier: Math.pow(2, 5),
hash: function(){
return function(){
return multiHashing.neoscrypt.apply(this, arguments);
}
}
},
skein: {
hash: function(){
return function(){

View File

@ -69,6 +69,7 @@ var JobManager = module.exports = function JobManager(options){
var coinbaseHasher = (function(){
switch(options.coin.algorithm){
case 'keccak':
case 'blake':
case 'fugue':
case 'groestl':
if (options.coin.normalHashing === true)
@ -89,6 +90,12 @@ var JobManager = module.exports = function JobManager(options){
return util.reverseBuffer(hashDigest.apply(this, arguments));
};
}
case 'scrypt-og':
if (options.coin.reward === 'POS') {
return function (d) {
return util.reverseBuffer(hashDigest.apply(this, arguments));
};
}
case 'scrypt-jane':
if (options.coin.reward === 'POS') {
return function (d) {
@ -96,6 +103,7 @@ var JobManager = module.exports = function JobManager(options){
};
}
case 'scrypt-n':
case 'sha1':
return function (d) {
return util.reverseBuffer(util.sha256d(d));
};
@ -228,12 +236,7 @@ var JobManager = module.exports = function JobManager(options){
//Check if share is a block candidate (matched network difficulty)
if (job.target.ge(headerBigNum)){
blockHex = job.serializeBlock(headerBuffer, coinbaseBuffer).toString('hex');
if (options.coin.algorithm === 'blake' || options.coin.algorithm === 'neoscrypt') {
blockHash = util.reverseBuffer(util.sha256d(headerBuffer, nTime)).toString('hex');
}
else {
blockHash = blockHasher(headerBuffer, nTime).toString('hex');
}
blockHash = blockHasher(headerBuffer, nTime).toString('hex');
}
else {
if (options.emitInvalidBlockHashes)

View File

@ -188,9 +188,6 @@ var Peer = module.exports = function (options) {
_this.emit('connected');
}
break;
case commands.version.toString():
SendMessage(commands.verack, Buffer.alloc(0));
break;
default:
break;
}

View File

@ -245,7 +245,7 @@ exports.CreateGeneration = function(rpcData, publicKey, extraNoncePlaceholder, r
var scriptSigPart1 = Buffer.concat([
util.serializeNumber(rpcData.height),
new Buffer([]),
new Buffer(rpcData.coinbaseaux.flags, 'hex'),
util.serializeNumber(Date.now() / 1000 | 0),
new Buffer([extraNoncePlaceholder.length])
]);

View File

@ -12,9 +12,9 @@
"litecoin",
"scrypt"
],
"homepage": "https://github.com/ranchimall/node-stratum-pool",
"homepage": "https://github.com/zone117x/node-stratum-pool",
"bugs": {
"url": "https://github.com/ranchimall/node-stratum-pool/issues"
"url": "https://github.com/zone117x/node-stratum-pool/issues"
},
"license": "GPL-2.0",
"author": "Matthew Little",
@ -25,11 +25,11 @@
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "https://github.com/ranchimall/node-stratum-pool.git"
"url": "https://github.com/zone117x/node-stratum-pool.git"
},
"dependencies": {
"multi-hashing": "git://github.com/zone117x/node-multi-hashing.git",
"bignum": "0.12.1",
"bignum": "*",
"base58-native": "*",
"async": "*"
},