From 9f6a78ca9db281ac11240073d71497a20a89eb81 Mon Sep 17 00:00:00 2001 From: cubedro Date: Fri, 20 Mar 2015 08:36:52 +0200 Subject: [PATCH] added clientVersion --- lib/node.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/node.js b/lib/node.js index c8a7a96..1cf4d37 100644 --- a/lib/node.js +++ b/lib/node.js @@ -37,6 +37,10 @@ function Node() { var self = this; + web3.setProvider(new web3.providers.HttpProvider('http://' + (process.env.RPC_HOST || 'localhost') + ':' + (process.env.RPC_PORT || '8080'))); + + ETH_VERSION = web3.version; + this.info = { name: INSTANCE_NAME || (process.env.EC2_INSTANCE_ID || os.hostname()), node: 'unknown', @@ -76,8 +80,6 @@ function Node() this.chainWatch = false; this.updateInterval = false; - web3.setProvider(new web3.providers.HttpProvider('http://' + (process.env.RPC_HOST || 'localhost') + ':' + (process.env.RPC_PORT || '8080'))); - socket.on('open', function open() { socket.emit('hello', { id: self.id, info: self.info, secret: WS_SECRET }); console.log('The connection has been opened.');