commit
70a90aee9b
@ -37,6 +37,10 @@ function Node()
|
|||||||
{
|
{
|
||||||
var self = this;
|
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 = {
|
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: 'unknown',
|
||||||
@ -76,8 +80,6 @@ function Node()
|
|||||||
this.chainWatch = false;
|
this.chainWatch = false;
|
||||||
this.updateInterval = 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.on('open', function open() {
|
||||||
socket.emit('hello', { id: self.id, info: self.info, secret: WS_SECRET });
|
socket.emit('hello', { id: self.id, info: self.info, secret: WS_SECRET });
|
||||||
console.log('The connection has been opened.');
|
console.log('The connection has been opened.');
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
"primus": "^2.4.12",
|
"primus": "^2.4.12",
|
||||||
"primus-emit": "^0.1.2",
|
"primus-emit": "^0.1.2",
|
||||||
"primus-spark-latency": "^0.1.1",
|
"primus-spark-latency": "^0.1.1",
|
||||||
"shelljs": "^0.3.0",
|
"shelljs": "^0.4.0",
|
||||||
"ws": "^0.7.1"
|
"ws": "^0.7.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Loading…
Reference in New Issue
Block a user