miner: update block header during hashing.
This commit is contained in:
parent
49d41f17e4
commit
2c31d7f1b0
@ -314,13 +314,13 @@ MinerBlock.prototype.findNonce = function findNonce() {
|
|||||||
MinerBlock.prototype.findNonceAsync = co(function* findNonceAsync() {
|
MinerBlock.prototype.findNonceAsync = co(function* findNonceAsync() {
|
||||||
var block = this.block;
|
var block = this.block;
|
||||||
var target = this.target;
|
var target = this.target;
|
||||||
var data = block.abbr();
|
|
||||||
var interval = MinerBlock.INTERVAL;
|
var interval = MinerBlock.INTERVAL;
|
||||||
var min = 0;
|
var min = 0;
|
||||||
var max = interval;
|
var max = interval;
|
||||||
var nonce;
|
var data, nonce;
|
||||||
|
|
||||||
while (max <= 0xffffffff) {
|
while (max <= 0xffffffff) {
|
||||||
|
data = block.abbr();
|
||||||
nonce = yield workers.pool.mine(data, target, min, max);
|
nonce = yield workers.pool.mine(data, target, min, max);
|
||||||
|
|
||||||
if (this.destroyed)
|
if (this.destroyed)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user