From 790c335c5bd59d80eed88b22b3c4c9826954c538 Mon Sep 17 00:00:00 2001 From: cubedro Date: Thu, 30 Jul 2015 11:49:36 +0300 Subject: [PATCH] fixed nodes status --- src-lite/js/filters.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src-lite/js/filters.js b/src-lite/js/filters.js index 8541882..36578dd 100644 --- a/src-lite/js/filters.js +++ b/src-lite/js/filters.js @@ -527,13 +527,13 @@ angular.module('netStatsApp.filters', []) for(var x = 0; x < nodes.length; x++) { - if(nodes[x].stats.block.number === bestBlock.number && nodes[x].stats.block.hash !== bestBlock.hash) + if(nodes[x].stats.block.number === bestBlock.block.number && nodes[x].stats.block.hash !== bestBlock.block.hash) return 'danger'; - if((bestBlock.number - nodes[x].stats.block.number) > 1 && (now - bestBlock.received) >= 20*1000) + if((bestBlock.block.number - nodes[x].stats.block.number) > 1 && (now - bestBlock.block.received) >= 20*1000) status = 'orange'; - if((bestBlock.number - nodes[x].stats.block.number) === 1 && (now - bestBlock.received) >= 10*1000 && status !== 'orange') + if((bestBlock.block.number - nodes[x].stats.block.number) === 1 && (now - bestBlock.block.received) >= 10*1000 && status !== 'orange') status = 'warning'; } @@ -546,7 +546,7 @@ angular.module('netStatsApp.filters', []) for(var x = 0; x < nodes.length; x++) { - if(nodes[x].stats.block.number === bestBlock.number && nodes[x].stats.block.hash === bestBlock.hash) + if(nodes[x].stats.block.number === bestBlock.block.number && nodes[x].stats.block.hash === bestBlock.block.hash) cnt++; }