Added groestl to algos

This commit is contained in:
Matt 2014-04-21 14:31:35 -06:00
parent 58668a9543
commit 7aa918ef95
2 changed files with 20 additions and 14 deletions

View File

@ -103,6 +103,14 @@ var algos = module.exports = global.algos = {
}
}
},
groestl: {
multiplier: Math.pow(2, 8),
hash: function(){
return function(){
return multiHashing.groestl.apply(this, arguments);
}
}
},
fugue: {
multiplier: Math.pow(2, 8),
hash: function(){

View File

@ -74,6 +74,7 @@ var JobManager = module.exports = function JobManager(options){
case 'blake':
case 'skein':
case 'fugue':
case 'groestl':
if (options.coin.normalHashing === true)
return util.sha256d;
else
@ -83,27 +84,24 @@ var JobManager = module.exports = function JobManager(options){
}
})();
var blockHasher = (function(){
switch(options.coin.algorithm){
case 'x11':
case 'quark':
case 'keccak':
case 'skein':
case 'fugue':
case 'blake':
return function(){
return util.reverseBuffer(hashDigest.apply(this, arguments));
};
var blockHasher = (function () {
switch (options.coin.algorithm) {
case 'scrypt':
if (options.coin.reward === 'POS') {
return function () {
return function (d) {
return util.reverseBuffer(hashDigest.apply(this, arguments));
};
}
default:
return function(d){
case 'scrypt-jane':
case 'scrypt-n':
return function (d) {
return util.reverseBuffer(util.sha256d(d));
};
default:
return function () {
return util.reverseBuffer(hashDigest.apply(this, arguments));
};
}
})();