File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,14 +18,6 @@ var filterTrace = require('./filters').filterTrace;
1818
1919/*Start config for node connection and sync*/
2020var config = { } ;
21- // set the default NODE address to localhost if it's not provided
22- if ( ! ( 'nodeAddr' in config ) || ! ( config . nodeAddr ) ) {
23- config . nodeAddr = 'localhost' ; // default
24- }
25- // set the default geth port if it's not provided
26- if ( ! ( 'gethPort' in config ) || ( typeof config . gethPort ) !== 'number' ) {
27- config . gethPort = 8545 ; // default
28- }
2921//Look for config.json file if not
3022try {
3123 var configContents = fs . readFileSync ( 'config.json' ) ;
@@ -41,6 +33,16 @@ catch (error) {
4133 process . exit ( 1 ) ;
4234 }
4335}
36+
37+ // set the default NODE address to localhost if it's not provided
38+ if ( ! ( 'nodeAddr' in config ) || ! ( config . nodeAddr ) ) {
39+ config . nodeAddr = 'localhost' ; // default
40+ }
41+ // set the default geth port if it's not provided
42+ if ( ! ( 'gethPort' in config ) || ( typeof config . gethPort ) !== 'number' ) {
43+ config . gethPort = 8545 ; // default
44+ }
45+
4446//Create Web3 connection
4547if ( typeof web3 !== "undefined" ) {
4648 web3 = new Web3 ( web3 . currentProvider ) ;
You can’t perform that action at this time.
0 commit comments