Post
Topic
Board Archival
Re: Mining pools list
by
s0br
on 14/05/2015, 12:56:26 UTC
If anyone uses node stratum or variant you can just replace the function registerSubmit in blockTemplate.js with...

 this.registerSubmit = function(extraNonce1, extraNonce2, nTime, nonce){
    var extraNonce1_bin = new Buffer(extraNonce1, "hex")
    var extraNonce2_bin = new Buffer(extraNonce2, "hex")
    var nTime_bin = new Buffer(nTime, "hex")
    var nonce_bin = new Buffer(nonce, "hex")

    var submission = new Buffer.concat([extraNonce1_bin, extraNonce2_bin, nTime_bin, nonce_bin])
    
    if (submits.indexOf(submission) === -1){
        submits.push(submission);
        return true;
    }

    return false;
}