Skip to content
Permalink
Browse files

Merge pull request cubedro#234 from cubedro/develop

Updated web3 and fixed sync issue
  • Loading branch information...
cubedro committed Apr 7, 2016
2 parents 5029c39 + 5d310fc commit bdc192ebb76fc9964ef0da83ee88bc86ba69c052
Showing with 7 additions and 4 deletions.
  1. +5 −2 lib/node.js
  2. +2 −2 package.json
@@ -31,7 +31,7 @@ var UPDATE_INTERVAL = 5000;
var PING_INTERVAL = 3000;
var MINERS_LIMIT = 5;
var MAX_HISTORY_UPDATE = 50;
var MAX_CONNECTION_ATTEMPTS = 30;
var MAX_CONNECTION_ATTEMPTS = 50;
var CONNECTION_ATTEMPTS_TIMEOUT = 1000;

Socket = Primus.createSocket({
@@ -134,7 +134,8 @@ Node.prototype.startWeb3Connection = function()
{
console.info('Starting web3 connection');

web3 = new Web3(new Web3.providers.HttpProvider('http://' + (process.env.RPC_HOST || 'localhost') + ':' + (process.env.RPC_PORT || '8545')));
web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://' + (process.env.RPC_HOST || 'localhost') + ':' + (process.env.RPC_PORT || '8545')));

this.checkWeb3Connection();
}
@@ -733,6 +734,8 @@ Node.prototype.setWatches = function()
console.info("SYNC UPDATE:", sync);
} else {
console.info("SYNC STOPPED:", sync);
self.stats.syncing = false;
self.setFilters();
}
} else {
self.stats.syncing = false;
@@ -1,7 +1,7 @@
{
"name": "eth-net-intelligence-api",
"description": "Ethereum Network Intelligence API",
"version": "0.1.0",
"version": "0.1.1",
"private": true,
"main": "./app.js",
"directories": {
@@ -16,7 +16,7 @@
"primus": "4.0.5",
"primus-emit": "1.0.0",
"primus-spark-latency": "0.1.1",
"web3": "0.15.1",
"web3": "0.15.3",
"ws": "^1.0.1"
},
"scripts": {

0 comments on commit bdc192e

Please sign in to comment.
You can’t perform that action at this time.