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);