Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There a lot of thing has been update by krisklosterman #128

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed all the testing comments
krisklosterman committed Jul 12, 2017

Verified

This commit was signed with the committer’s verified signature. The key has expired.
rogargon Roberto García
commit ebc30bb11d6568b4013346f001260b910d8a1025
16 changes: 0 additions & 16 deletions lib/jobManager.js
Original file line number Diff line number Diff line change
@@ -212,8 +212,6 @@ var JobManager = module.exports = function JobManager(options){
return shareError([22, 'duplicate share']);
}

console.log(jobId + " | " + previousDifficulty + " | " + difficulty + " | " + extraNonce1 + " | " + extraNonce2 + " | " + nTime + " | " + nonce + " | " + ipAddress + " | " + port + " | " + workerName);

var extraNonce1Buffer = Buffer.from(extraNonce1, 'hex');
var extraNonce2Buffer = Buffer.from(extraNonce2, 'hex');

@@ -234,24 +232,10 @@ var JobManager = module.exports = function JobManager(options){

var blockDiffAdjusted = job.difficulty * shareMultiplier;

console.log(extraNonce1Buffer);
console.log(extraNonce2Buffer);
console.log(coinbaseBuffer);
console.log(coinbaseHash);
console.log(merkleRoot);
console.log(headerBuffer);
console.log(headerHash);
console.log(headerBigNum);
console.log(shareDiff);
console.log(blockDiffAdjusted);

//Check if share is a block candidate (matched network difficulty)
console.log("Job Target: " + job.target);
if (job.target.ge(headerBigNum)){
blockHex = job.serializeBlock(headerBuffer, coinbaseBuffer).toString('hex');
blockHash = blockHasher(headerBuffer, nTime).toString('hex');
console.log(blockHex);
console.log(blockHash);
}
else {
if (options.emitInvalidBlockHashes)
10 changes: 0 additions & 10 deletions lib/pool.js
Original file line number Diff line number Diff line change
@@ -224,8 +224,6 @@ var pool = module.exports = function pool(options, authorizeFn){
*/
function SubmitBlock(blockHex, callback){

console.log("SUBMIT BLOCK: BlockHex: " + blockHex)

var rpcCommand, rpcArgs;
if (options.hasSubmitMethod){
rpcCommand = 'submitblock';
@@ -251,8 +249,6 @@ var pool = module.exports = function pool(options, authorizeFn){
}
else if (result.response === 'rejected') {
emitErrorLog('Daemon instance ' + result.instance.index + ' rejected a supposedly valid block');
console.log("NSP: SubmitBlock: Rejected");
console.log(result);
return;
}
}
@@ -319,9 +315,6 @@ var pool = module.exports = function pool(options, authorizeFn){
before we emit the share, lets submit the block,
then check if it was accepted using RPC getblock
*/
console.log("NSP: OnShare: sharedata and blockhex following this");
console.log(shareData);
console.log(blockHex);
if (!isValidBlock)
emitShare();
else{
@@ -336,9 +329,6 @@ var pool = module.exports = function pool(options, authorizeFn){
emitLog('Block notification via RPC after block submission');
});

console.log("NSP: CheckBlockAccepted called: ");
console.log(isAccepted);

});
});
}
1 change: 0 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
@@ -26,7 +26,6 @@ exports.getVersionByte = function(addr){
exports.sha256 = function(buffer){
var hash1 = crypto.createHash('sha256');
hash1.update(buffer);
console.log("Running sha256 on nsp: " + hash1);
return hash1.digest();
};