Skip to content

Commit e2ab0af

Browse files
Update algoProperties.js and blockTemplate.js fot VIPSTARCOIN
1 parent 046cc97 commit e2ab0af

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

lib/algoProperties.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -423,15 +423,14 @@ var algos = module.exports = global.algos = {
423423
return multiHashing.yespower_urx(data, nValue, rValue);
424424
}
425425
}
426-
}
427-
/*'vipstar': {
426+
},
427+
'vipstar': {
428428
hash: function () {
429429
return function () {
430430
return multiHashing.sha256d.apply(this, arguments);
431431
}
432432
}
433433
}
434-
*/
435434
};
436435

437436

lib/blockTemplate.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
8888
var headerSize;
8989
if (rpcData.version == 5 && rpcData.finalsaplingroothash) {
9090
headerSize = 112;
91-
/*} else if (rpcData.hashstateroot && rpcData.hashutxoroot) {
92-
headerSize = 181;*/
91+
} else if (rpcData.hashstateroot && rpcData.hashutxoroot) {
92+
headerSize = 181;
9393
} else {
9494
headerSize = 80;
9595
}
@@ -114,12 +114,12 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
114114
header.write(rpcData.finalsaplingroothash, position, 32, 'hex');
115115
position += 32;
116116
}
117-
/*if (rpcData.hashstateroot && rpcData.hashutxoroot) {
117+
if (rpcData.hashstateroot && rpcData.hashutxoroot) {
118118
header.write('00ffffffff000000000000000000000000000000000000000000000000000000000000', position, 37, 'hex');
119119
header.write(rpcData.hashutxoroot, position += 37, 32, 'hex');
120120
header.write(rpcData.hashstateroot, position += 32, 32, 'hex');
121-
header.write(nonce, position +=32, 4, 'hex');
122-
}*/
121+
header.write(nonce, position += 32, 4, 'hex');
122+
}
123123
header.write(nonce, position, 4, 'hex');
124124
header.write(rpcData.bits, position += 4, 4, 'hex');
125125
header.write(nTime, position += 4, 4, 'hex');
@@ -172,11 +172,11 @@ var BlockTemplate = module.exports = function BlockTemplate(jobId, rpcData, pool
172172
if (this.finalsaplingroothashReversed) {
173173
this.jobParams.push(this.finalsaplingroothashReversed);
174174
}
175-
/*if (this.hashstaterootReversed && this.hashutxorootReversed) {
175+
if (this.hashstaterootReversed && this.hashutxorootReversed) {
176176
this.jobParams.push(this.hashstaterootReversed);
177177
this.jobParams.push(this.hashutxorootReversed);
178178
this.jobParams.push('0000000000000000000000000000000000000000000000000000000000000000ffffffff00');
179-
}*/
179+
}
180180
}
181181
return this.jobParams;
182182
};

0 commit comments

Comments
 (0)