updated travis

This commit is contained in:
cubedro 2015-04-29 05:14:56 +03:00
parent 788b396e8c
commit 93da116b7f
2 changed files with 17 additions and 6 deletions

View File

@ -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"

View File

@ -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)
{