From c4649c9b133840935b43d01134f8e11089dc6fd7 Mon Sep 17 00:00:00 2001 From: Braydon Fuller Date: Thu, 7 Apr 2016 15:00:09 -0400 Subject: [PATCH] test: mark last zmq block before rpc calls --- lib/services/bitcoind.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/bitcoind.js b/lib/services/bitcoind.js index 3803ffa6..bf74ac9a 100644 --- a/lib/services/bitcoind.js +++ b/lib/services/bitcoind.js @@ -242,7 +242,6 @@ Bitcoin.prototype._zmqBlockHandler = function(node, message) { return log.error(err); } self.height = response.result.height; - self.zmqLastBlock = new Date(); $.checkState(self.height >= 0); self.emit('tip', self.height); }); @@ -261,6 +260,7 @@ Bitcoin.prototype._zmqBlockHandler = function(node, message) { // Prevent a rapid succession of updates with regtest if (self.node.network.regtestEnabled) { if (new Date() - self.zmqLastBlock > 1000) { + self.zmqLastBlock = new Date(); updateChain(); } else { clearTimeout(self.zmqUpdateTipTimeout);