Skip to content

Commit

Permalink
Update algoProperties.js and blockTemplate.js fot VIPSTARCOIN
Browse files Browse the repository at this point in the history
  • Loading branch information
ROZ-MOFUMOFU-ME committed Nov 9, 2024
1 parent 046cc97 commit e2ab0af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
5 changes: 2 additions & 3 deletions lib/algoProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -423,15 +423,14 @@ var algos = module.exports = global.algos = {
return multiHashing.yespower_urx(data, nValue, rValue);
}
}
}
/*'vipstar': {
},
'vipstar': {
hash: function () {
return function () {
return multiHashing.sha256d.apply(this, arguments);
}
}
}
*/
};


Expand Down
14 changes: 7 additions & 7 deletions lib/blockTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
var headerSize;
if (rpcData.version == 5 && rpcData.finalsaplingroothash) {
headerSize = 112;
/*} else if (rpcData.hashstateroot && rpcData.hashutxoroot) {
headerSize = 181;*/
} else if (rpcData.hashstateroot && rpcData.hashutxoroot) {
headerSize = 181;
} else {
headerSize = 80;
}
Expand All @@ -114,12 +114,12 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
header.write(rpcData.finalsaplingroothash, position, 32, 'hex');
position += 32;
}
/*if (rpcData.hashstateroot && rpcData.hashutxoroot) {
if (rpcData.hashstateroot && rpcData.hashutxoroot) {
header.write('00ffffffff000000000000000000000000000000000000000000000000000000000000', position, 37, 'hex');
header.write(rpcData.hashutxoroot, position += 37, 32, 'hex');
header.write(rpcData.hashstateroot, position += 32, 32, 'hex');
header.write(nonce, position +=32, 4, 'hex');
}*/
header.write(nonce, position += 32, 4, 'hex');
}
header.write(nonce, position, 4, 'hex');
header.write(rpcData.bits, position += 4, 4, 'hex');
header.write(nTime, position += 4, 4, 'hex');
Expand Down Expand Up @@ -172,11 +172,11 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
if (this.finalsaplingroothashReversed) {
this.jobParams.push(this.finalsaplingroothashReversed);
}
/*if (this.hashstaterootReversed && this.hashutxorootReversed) {
if (this.hashstaterootReversed && this.hashutxorootReversed) {
this.jobParams.push(this.hashstaterootReversed);
this.jobParams.push(this.hashutxorootReversed);
this.jobParams.push('0000000000000000000000000000000000000000000000000000000000000000ffffffff00');
}*/
}
}
return this.jobParams;
};
Expand Down

0 comments on commit e2ab0af

Please sign in to comment.