updated travis
This commit is contained in:
parent
788b396e8c
commit
93da116b7f
11
.travis.yml
11
.travis.yml
@ -1,3 +1,14 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "0.12"
|
||||
- "0.11"
|
||||
env:
|
||||
global:
|
||||
- secure: Qdkmi13nqcXskABBhbuGZmRakh4orOW1dalkSCyUbzGuYf0OdYF8ttNVuJa0WSWI4KhNXhtz2p3I8dM95wL++LCVqXFmIvZtX8Nca36KlNxIPNXPjn0odayh+c4pgrhrbz8TDmDXl9IPuZmNz8HHtN7xmIn6YDcm13wA3gTmfwo=
|
||||
- RPC_HOST=localhost
|
||||
- RPC_PORT=8080
|
||||
- LISTENING_PORT=30303
|
||||
- INSTANCE_NAME="Travis Node"
|
||||
- CONTACT_DETAILS="marian@ethdev.com"
|
||||
- WS_SERVER="wss://eth-netstats.herokuapp.com"
|
||||
- NODE_ENV="production"
|
||||
|
12
lib/node.js
12
lib/node.js
@ -435,21 +435,21 @@ Node.prototype.getStats = function()
|
||||
this.uptime();
|
||||
}
|
||||
|
||||
Node.prototype.getHistory = function(interval)
|
||||
Node.prototype.getHistory = function(range)
|
||||
{
|
||||
var history = [];
|
||||
console.log('interval', interval);
|
||||
if(typeof interval === 'undefined' || interval === null)
|
||||
console.log('range', range);
|
||||
if(typeof range === 'undefined' || range === null)
|
||||
{
|
||||
interval = {
|
||||
range = {
|
||||
min: this.stats.block.number - MAX_HISTORY_UPDATE,
|
||||
max: this.stats.block.number - 1
|
||||
}
|
||||
}
|
||||
|
||||
for(var number = interval.min; number <= interval.max; number++)
|
||||
for(var i = range.min; i <= range.max; i++)
|
||||
{
|
||||
var block = this.getBlock(number);
|
||||
var block = this.getBlock(i);
|
||||
|
||||
if(block !== null && block.number !== this.blocks[0].number)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user