File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ var UPDATE_INTERVAL = 5000;
3131var PING_INTERVAL = 3000 ;
3232var MINERS_LIMIT = 5 ;
3333var MAX_HISTORY_UPDATE = 50 ;
34- var MAX_CONNECTION_ATTEMPTS = 30 ;
34+ var MAX_CONNECTION_ATTEMPTS = 50 ;
3535var CONNECTION_ATTEMPTS_TIMEOUT = 1000 ;
3636
3737Socket = Primus . createSocket ( {
@@ -134,7 +134,8 @@ Node.prototype.startWeb3Connection = function()
134134{
135135 console . info ( 'Starting web3 connection' ) ;
136136
137- web3 = new Web3 ( new Web3 . providers . HttpProvider ( 'http://' + ( process . env . RPC_HOST || 'localhost' ) + ':' + ( process . env . RPC_PORT || '8545' ) ) ) ;
137+ web3 = new Web3 ( ) ;
138+ web3 . setProvider ( new web3 . providers . HttpProvider ( 'http://' + ( process . env . RPC_HOST || 'localhost' ) + ':' + ( process . env . RPC_PORT || '8545' ) ) ) ;
138139
139140 this . checkWeb3Connection ( ) ;
140141}
@@ -733,6 +734,8 @@ Node.prototype.setWatches = function()
733734 console . info ( "SYNC UPDATE:" , sync ) ;
734735 } else {
735736 console . info ( "SYNC STOPPED:" , sync ) ;
737+ self . stats . syncing = false ;
738+ self . setFilters ( ) ;
736739 }
737740 } else {
738741 self . stats . syncing = false ;
Original file line number Diff line number Diff line change 11{
22 "name" : " eth-net-intelligence-api" ,
33 "description" : " Ethereum Network Intelligence API" ,
4- "version" : " 0.1.0 " ,
4+ "version" : " 0.1.1 " ,
55 "private" : true ,
66 "main" : " ./app.js" ,
77 "directories" : {
1616 "primus" : " 4.0.5" ,
1717 "primus-emit" : " 1.0.0" ,
1818 "primus-spark-latency" : " 0.1.1" ,
19- "web3" : " 0.15.1 " ,
19+ "web3" : " 0.15.3 " ,
2020 "ws" : " ^1.0.1"
2121 },
2222 "scripts" : {
You can’t perform that action at this time.
0 commit comments