From 99d2cceebe81a8b490d9ff2effeeaa437c0335d7 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sun, 12 Mar 2017 11:32:46 -0700 Subject: [PATCH] rpc: fix nonce updating. --- lib/http/rpc.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/http/rpc.js b/lib/http/rpc.js index da9829c7..c903079f 100644 --- a/lib/http/rpc.js +++ b/lib/http/rpc.js @@ -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');