From ce0be1fe1ec2a3ad049e1cf8b96d7907246c73c4 Mon Sep 17 00:00:00 2001 From: cubedro Date: Tue, 7 Apr 2015 20:07:23 +0300 Subject: [PATCH] Removed negative blocktimes --- lib/node.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/node.js b/lib/node.js index 6ece68d..d25b844 100644 --- a/lib/node.js +++ b/lib/node.js @@ -265,6 +265,8 @@ Node.prototype.calculateBlockTimes = function() { var diff = (key > 0 ? list[key - 1].timestamp : Math.floor(Date.now()/1000)) - block.timestamp; + diff = Math.max(diff, 0); + return diff; });