miner: update block header during hashing.

This commit is contained in:
Christopher Jeffrey 2016-10-05 20:05:29 -07:00
parent 49d41f17e4
commit 2c31d7f1b0
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -314,13 +314,13 @@ MinerBlock.prototype.findNonce = function findNonce() {
MinerBlock.prototype.findNonceAsync = co(function* findNonceAsync() {
var block = this.block;
var target = this.target;
var data = block.abbr();
var interval = MinerBlock.INTERVAL;
var min = 0;
var max = interval;
var nonce;
var data, nonce;
while (max <= 0xffffffff) {
data = block.abbr();
nonce = yield workers.pool.mine(data, target, min, max);
if (this.destroyed)