diff --git a/lib/node.js b/lib/node.js index 8cd766f..6eedfd9 100644 --- a/lib/node.js +++ b/lib/node.js @@ -137,7 +137,8 @@ Node.prototype.getBlock = function(number) number: 0, hash: '?', difficulty: 0, - timestamp: 0 + timestamp: 0, + arrival: 0 }; if(typeof number === 'undefined'){ @@ -157,6 +158,8 @@ Node.prototype.getBlock = function(number) try { block = web3.eth.block(number); + block.arrival = Math.floor(Date.now()/1000); + block.propagation = block.arrival - block.timestamp; if(block.hash != '?' && typeof block.difficulty !== 'undefined') {