From 41c3a06eeff4dff6f1a181057000c7133b0ea0b2 Mon Sep 17 00:00:00 2001 From: cubedro Date: Fri, 8 Jan 2016 15:41:01 +0200 Subject: [PATCH 1/4] fixed #284 --- lib/utils/logger.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/logger.js b/lib/utils/logger.js index eaa9d9d..81dd3e2 100644 --- a/lib/utils/logger.js +++ b/lib/utils/logger.js @@ -111,7 +111,7 @@ var ENV_VERBOSITY = process.env.VERBOSITY || 2; console[item.name] = function () { - if(verbosity[ENV_VERBOSITY].indexOf(fnName) === -1) + if(verbosity[ENV_VERBOSITY].indexOf(item.name) === -1) return false; var args = Array.prototype.slice.call(arguments); From cbaca99b9edddf9f697343389ff6532fc56a7609 Mon Sep 17 00:00:00 2001 From: cubedro Date: Mon, 1 Feb 2016 23:15:51 +0200 Subject: [PATCH 2/4] added support for isSyncing --- lib/node.js | 7 ++++++- src/views/index.jade | 12 ++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/node.js b/lib/node.js index 2227e39..66ce8af 100644 --- a/lib/node.js +++ b/lib/node.js @@ -32,6 +32,7 @@ var Node = function(data) transactions: [], uncles: [] }, + syncing: false, propagationAvg: 0, latency: 0, uptime: 100 @@ -113,6 +114,7 @@ Node.prototype.getInfo = function(callback) stats: { active: this.stats.active, mining: this.stats.mining, + syncing: this.stats.syncing, hashrate: this.stats.hashrate, peers: this.stats.peers, gasPrice: this.stats.gasPrice, @@ -235,6 +237,7 @@ Node.prototype.setBasicStats = function(stats, callback) { this.stats.active = stats.active; this.stats.mining = stats.mining; + this.stats.syncing = (!_.isUndefined(stats.syncing) ? stats.syncing : false); this.stats.hashrate = stats.hashrate; this.stats.peers = stats.peers; this.stats.gasPrice = stats.gasPrice; @@ -284,6 +287,7 @@ Node.prototype.getStats = function() stats: { active: this.stats.active, mining: this.stats.mining, + syncing: this.stats.syncing, hashrate: this.stats.hashrate, peers: this.stats.peers, gasPrice: this.stats.gasPrice, @@ -314,6 +318,7 @@ Node.prototype.getBasicStats = function() stats: { active: this.stats.active, mining: this.stats.mining, + syncing: this.stats.syncing, hashrate: this.stats.hashrate, peers: this.stats.peers, gasPrice: this.stats.gasPrice, @@ -370,7 +375,7 @@ Node.prototype.getBlockNumber = function() Node.prototype.canUpdate = function() { // return (this.info.canUpdateHistory && this.trusted) || false; - return (this.info.canUpdateHistory) || false; + return (this.info.canUpdateHistory || (this.stats.syncing === false && this.stats.peers > 0)) || false; } Node.prototype.isInactiveAndOld = function() diff --git a/src/views/index.jade b/src/views/index.jade index 9b7f70f..6b14bb2 100644 --- a/src/views/index.jade +++ b/src/views/index.jade @@ -164,12 +164,12 @@ block content i.icon-warning-o span.small-title ATTENTION! span.small-value This page does not represent the entire state of the ethereum network - listing a node on this page is a voluntary process. - div.col-xs-12.stat-holder.box - div.active-nodes.text-danger - i.icon-hashrate - span.small-title SECURITY ALERT - span.small-value - a(href="https://blog.ethereum.org/2015/09/10/security-alert-previous-security-patch-can-lead-to-invalid-state-root-on-go-clients-with-a-specific-transaction-sequence-fixed-please-update/", target="_blank", class="text-danger") Read the blog post + //- div.col-xs-12.stat-holder.box + //- div.active-nodes.text-danger + //- i.icon-hashrate + //- span.small-title SECURITY ALERT + //- span.small-value + //- a(href="https://blog.ethereum.org/2015/09/10/security-alert-previous-security-patch-can-lead-to-invalid-state-root-on-go-clients-with-a-specific-transaction-sequence-fixed-please-update/", target="_blank", class="text-danger") Read the blog post //- div.clearfix From 2a7b1f1b5d7ffb10adc3fe93c003eb7084f5364b Mon Sep 17 00:00:00 2001 From: cubedro Date: Mon, 1 Feb 2016 23:20:29 +0200 Subject: [PATCH 3/4] bumped api version --- src/js/controllers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers.js b/src/js/controllers.js index 2e2219c..05f92b7 100644 --- a/src/js/controllers.js +++ b/src/js/controllers.js @@ -37,7 +37,7 @@ netStatsApp.controller('StatsCtrl', function($scope, $filter, $localStorage, soc $scope.latency = 0; - $scope.currentApiVersion = "0.0.16"; + $scope.currentApiVersion = "0.1.0"; $scope.predicate = $localStorage.predicate || ['-pinned', '-stats.active', '-stats.block.number', 'stats.block.propagation']; $scope.reverse = $localStorage.reverse || false; From f29010668d84934e9c16783b4834748638dc710d Mon Sep 17 00:00:00 2001 From: cubedro Date: Tue, 2 Feb 2016 14:46:24 +0200 Subject: [PATCH 4/4] updated analytics code --- src/js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/script.js b/src/js/script.js index 5a981b3..eb5a9de 100644 --- a/src/js/script.js +++ b/src/js/script.js @@ -32,5 +32,5 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); -ga('create', 'UA-63657296-1', 'auto'); +ga('create', 'UA-68390837-2', 'auto'); ga('send', 'pageview'); \ No newline at end of file