Fix error with calculating FantomCoin block ID
parent
dd23be73ad
commit
5448dcfccd
|
@ -22,10 +22,6 @@ var log = function(severity, system, text, data){
|
|||
|
||||
var cryptoNight = multiHashing['cryptonight'];
|
||||
|
||||
function cryptoNightFast(buf) {
|
||||
return cryptoNight(Buffer.concat([new Buffer([buf.length]), buf]), true);
|
||||
}
|
||||
|
||||
var diff1 = bignum('FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 16);
|
||||
|
||||
var instanceId = crypto.randomBytes(4);
|
||||
|
@ -399,7 +395,7 @@ function processShare(miner, job, blockTemplate, nonce, resultHash){
|
|||
var blockFastHash;
|
||||
|
||||
if (hashDiff.ge(blockTemplate.difficulty)){
|
||||
blockFastHash = cryptoNightFast(convertedBlob || cnUtil.convert_blob(shareBuffer)).toString('hex');
|
||||
blockFastHash = cnUtil.get_block_id(shareBuffer).toString('hex');
|
||||
|
||||
apiInterfaces.rpcDaemon('submitblock', [shareBuffer.toString('hex')], function(error, result){
|
||||
if (error){
|
||||
|
|
Loading…
Reference in New Issue