From aacd5be06a0b4506b80e3f1b5715afd35cc15fb6 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 28 Mar 2014 16:40:26 -0600 Subject: [PATCH] More research on multi-algo --- diff1.js | 6 +++++- lib/algoProperties.js | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/diff1.js b/diff1.js index 83a79d5..b48227a 100644 --- a/diff1.js +++ b/diff1.js @@ -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')); diff --git a/lib/algoProperties.js b/lib/algoProperties.js index 519fc5b..4c495bb 100644 --- a/lib/algoProperties.js +++ b/lib/algoProperties.js @@ -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);