More research on multi-algo

This commit is contained in:
Matt 2014-03-28 16:40:26 -06:00
parent b2e7081722
commit aacd5be06a
2 changed files with 8 additions and 1 deletions

View File

@ -339,8 +339,12 @@ else {
var diffLogLines = [];
for (var algo in algos){
var whitespace = new Array(15 - algo.length).join(' ');
var diff1 = TestEquality(algo, algos[algo].shift, algos[algo].nBits);
diffLogLines.push(algo + ': \t\t0x' + diff1);
diffLogLines.push(algo + ':' + whitespace + '0x' + diff1);
}
console.log('Pools should use these difficulties:\n' + diffLogLines.join('\n'));

View File

@ -37,6 +37,9 @@ global.algos = {
}
},
'keccak': {
//CBigNum(~uint256(0) >> 24) is nBits so we should try to calculate it..
//https://github.com/wecoin/wecoin/blob/master/src/main.cpp#L44
//https://github.com/GalleonBank/galleon/blob/master/src/main.cpp#L51
diff: 'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000',
hash: function(headerBuff, nTimeInt){
var a = new SHA3.SHA3Hash(256);