Merge pull request #3 from cubedro/develop

txCount error
This commit is contained in:
Marian OANCΞA 2015-02-27 01:20:30 +02:00
commit c991627807
2 changed files with 9 additions and 2 deletions

View File

@ -121,6 +121,7 @@ Node.prototype.isActive = function()
code: '1', code: '1',
msg: err msg: err
}); });
console.log(err);
} }
this.stats.active = false; this.stats.active = false;
@ -154,6 +155,7 @@ Node.prototype.getBlock = function(number)
code: '3', code: '3',
msg: err msg: err
}); });
console.log(err);
} }
} }
@ -170,6 +172,10 @@ Node.prototype.getBlock = function(number)
block.txCount = web3.eth.transactionCount(block.hash) || '?'; block.txCount = web3.eth.transactionCount(block.hash) || '?';
} }
catch (err) { catch (err) {
this.stats.errors.push({
code: '4',
msg: err
});
console.log(err); console.log(err);
} }
} }
@ -179,6 +185,7 @@ Node.prototype.getBlock = function(number)
code: '2', code: '2',
msg: err msg: err
}); });
console.log(err);
} }
return block; return block;

View File

@ -29,8 +29,8 @@
"NODE_ENV" : "production", "NODE_ENV" : "production",
"RPC_HOST" : "localhost", "RPC_HOST" : "localhost",
"RPC_PORT" : "8080", "RPC_PORT" : "8080",
"WS_SERVER" : "", "WS_SERVER" : "wss://eth-netstats.herokuapp.com",
"WS_SECRET" : "", "WS_SECRET" : "eth-net-stats-has-a-secret",
} }
} }
] ]