fixed block time math

This commit is contained in:
cubedro
2015-04-04 22:35:45 +03:00
parent 503dd93641
commit 40cddc175d
5 changed files with 53 additions and 43 deletions

View File

@@ -91,7 +91,7 @@ Node.prototype.setStats = function(stats)
if(typeof stats !== 'undefined' && typeof stats.block !== 'undefined' && typeof stats.block.number !== 'undefined')
{
if(stats.block.number !== this.stats.block.number) {
stats.block.received = (new Date()).getTime() - stats.block.arrival;
stats.block.received = (new Date()).getTime();
} else {
stats.block.received = this.stats.block.received;
}