Merge pull request #234 from cubedro/develop
Updated web3 and fixed sync issue
This commit is contained in:
commit
bdc192ebb7
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user