template: minor.

This commit is contained in:
Christopher Jeffrey 2017-03-10 05:03:59 -08:00
parent 945fa381c5
commit 1b098b61ba
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 9 additions and 8 deletions

View File

@ -75,7 +75,6 @@ CPUMiner.prototype._init = function _init() {
});
this.on('status', function(stat) {
// Send progress report.
self.logger.info(
'CPUMiner: hashrate=%dkhs hashes=%d target=%d height=%d best=%s',
stat.hashrate / 1000 | 0,

View File

@ -105,18 +105,17 @@ BlockTemplate.prototype.createCoinbase = function createCoinbase() {
input = new Input();
// Height (required in v2+ blocks)
input.script.set(0, new BN(this.height));
input.script.push(new BN(this.height));
// Let the world know this little
// miner succeeded.
input.script.set(1, encoding.ZERO_HASH160);
// Coinbase flags.
input.script.push(encoding.ZERO_HASH160);
// Smaller nonce for good measure.
input.script.set(2, util.nonce().slice(0, 4));
input.script.push(util.nonce().slice(0, 4));
// extraNonce - incremented when
// Extra nonce: incremented when
// the nonce overflows.
input.script.set(3, extraNonce(0, 0));
input.script.push(extraNonce(0, 0));
input.script.compile();
@ -180,6 +179,9 @@ BlockTemplate.prototype.createCoinbase = function createCoinbase() {
cb.refresh();
assert(input.script.getSize() <= 100,
'Coinbase input script is too large!');
return cb;
};