Merge pull request #68 from Earlz/master
Allow R and N value of normal scrypt to be specified
This commit is contained in:
commit
4dfaef5fce
@ -89,6 +89,8 @@ var myCoin = {
|
|||||||
"name": "Dogecoin",
|
"name": "Dogecoin",
|
||||||
"symbol": "DOGE",
|
"symbol": "DOGE",
|
||||||
"algorithm": "scrypt",
|
"algorithm": "scrypt",
|
||||||
|
"nValue": 1024, //optional. Defaults to 1024
|
||||||
|
"rValue": 1, //optional. Defaults to 1
|
||||||
"txMessages": false, //or true (not required, defaults to false)
|
"txMessages": false, //or true (not required, defaults to false)
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|||||||
@ -14,13 +14,15 @@ var algos = module.exports = global.algos = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scrypt: {
|
'scrypt': {
|
||||||
//Uncomment diff if you want to use hardcoded truncated diff
|
//Uncomment diff if you want to use hardcoded truncated diff
|
||||||
//diff: '0000ffff00000000000000000000000000000000000000000000000000000000',
|
//diff: '0000ffff00000000000000000000000000000000000000000000000000000000',
|
||||||
multiplier: Math.pow(2, 16),
|
multiplier: Math.pow(2, 16),
|
||||||
hash: function(){
|
hash: function(coinConfig){
|
||||||
return function(){
|
var nValue = coinConfig.nValue || 1024;
|
||||||
return multiHashing.scrypt.apply(this, arguments);
|
var rValue = coinConfig.rValue || 1;
|
||||||
|
return function(data){
|
||||||
|
return multiHashing.scrypt(data,nValue,rValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -158,4 +160,4 @@ for (var algo in algos){
|
|||||||
else{
|
else{
|
||||||
algos[algo].maxDiff = diff1;
|
algos[algo].maxDiff = diff1;
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user