commit
ec2716318d
|
@ -115,7 +115,18 @@ exports.list = function(req, res) {
|
||||||
for(var i=0;i<limit;i++) {
|
for(var i=0;i<limit;i++) {
|
||||||
blockshashList.push(blocks[i].hash);
|
blockshashList.push(blocks[i].hash);
|
||||||
}
|
}
|
||||||
async.mapSeries(blockshashList, getBlock, function(err, allblocks) {
|
async.mapSeries(blockshashList,
|
||||||
|
function(hash, cb) {
|
||||||
|
getBlock(hash, function(err, info) {
|
||||||
|
return cb(err,{
|
||||||
|
height: info.height,
|
||||||
|
size: info.size,
|
||||||
|
hash: info.hash,
|
||||||
|
time: info.time,
|
||||||
|
txlength: info.tx.length,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}, function(err, allblocks) {
|
||||||
res.jsonp({
|
res.jsonp({
|
||||||
blocks: allblocks,
|
blocks: allblocks,
|
||||||
length: allblocks.length,
|
length: allblocks.length,
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<tr class="fader" data-ng-repeat='b in blocks'>
|
<tr class="fader" data-ng-repeat='b in blocks'>
|
||||||
<td><a href="/block/{{b.hash}}">{{b.height}}</a></td>
|
<td><a href="/block/{{b.hash}}">{{b.height}}</a></td>
|
||||||
<td>{{b.time * 1000 | date:'medium'}}</td>
|
<td>{{b.time * 1000 | date:'medium'}}</td>
|
||||||
<td>{{b.tx.length}}</td>
|
<td>{{b.txlength}}</td>
|
||||||
<td>{{b.size}}</td>
|
<td>{{b.size}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in New Issue