fixed version for POC9

This commit is contained in:
cubedro 2015-03-22 22:55:15 +02:00
parent 6c0bf268b5
commit 491b2aa6f0

View File

@ -16,7 +16,6 @@ Socket = Primus.createSocket({
}); });
var INSTANCE_NAME = process.env.INSTANCE_NAME; var INSTANCE_NAME = process.env.INSTANCE_NAME;
var ETH_VERSION = "unknown";
if(process.env.NODE_ENV === 'production') if(process.env.NODE_ENV === 'production')
{ {
@ -26,7 +25,6 @@ if(process.env.NODE_ENV === 'production')
} }
} }
ETH_VERSION = shelljs.exec((process.env.ETH_IMPLEMENTATION === 'go' ? 'ethereum version' : 'eth -V'), {silent: true}).output;
var socket = new Socket(process.env.WS_SERVER || 'ws://localhost:3000'); var socket = new Socket(process.env.WS_SERVER || 'ws://localhost:3000');
var WS_SECRET = process.env.WS_SECRET || "eth-net-stats-has-a-secret"; var WS_SECRET = process.env.WS_SECRET || "eth-net-stats-has-a-secret";
@ -37,10 +35,12 @@ function Node()
{ {
var self = this; var self = this;
web3.setProvider(new web3.providers.HttpProvider('http://' + (process.env.RPC_HOST || 'localhost') + ':' + (process.env.RPC_PORT || '8545'))); web3.setProvider(new web3.providers.HttpProvider('http://' + (process.env.RPC_HOST || 'localhost') + ':' + (process.env.RPC_PORT || '8080')));
try { try {
ETH_VERSION = web3.version; ETH_VERSION = web3.version.client;
NET_VERSION = web3.version.network;
API_VERSION = web3.version.api;
} }
catch (err) { catch (err) {
console.log("couldn't get Version"); console.log("couldn't get Version");
@ -48,7 +48,9 @@ function Node()
this.info = { this.info = {
name: INSTANCE_NAME || (process.env.EC2_INSTANCE_ID || os.hostname()), name: INSTANCE_NAME || (process.env.EC2_INSTANCE_ID || os.hostname()),
node: 'unknown', node: ETH_VERSION,
net: NET_VERSION,
api: API_VERSION,
os: os.platform(), os: os.platform(),
os_v: os.release() os_v: os.release()
}; };