rpc: fix nonce updating.

This commit is contained in:
Christopher Jeffrey 2017-03-12 11:32:46 -07:00
parent 5ce806a723
commit 99d2cceebe
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -2169,9 +2169,9 @@ RPC.prototype.updateWork = co(function* updateWork() {
this.bindChain();
if (attempt) {
if (++this.nonce1 === 0xffffffff) {
this.nonce1 = 0;
this.nonce2++;
if (++this.nonce2 === 0x100000000) {
this.nonce2 = 0;
this.nonce1++;
}
root = attempt.getRoot(this.nonce1, this.nonce2);
root = root.toString('hex');