fixed nodes status

pull/5/head
cubedro 9 years ago
parent 65f877353f
commit 790c335c5b
  1. 8
      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++;
}

Loading…
Cancel
Save