#340 added mining pool detection on homepage and block list page
This commit is contained in:
parent
db064e9527
commit
36f3d6684a
|
@ -66,7 +66,12 @@ var getBlock = function(blockhash, cb) {
|
|||
isOrphan: 1,
|
||||
};
|
||||
}
|
||||
return cb(err, block.info);
|
||||
|
||||
bdb.getPoolInfo(block.info.tx[0], function(info) {
|
||||
block.info.poolInfo = info;
|
||||
return cb(err, block.info);
|
||||
});
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -130,6 +135,7 @@ exports.list = function(req, res) {
|
|||
hash: b.hash,
|
||||
time: b.ts || info.time,
|
||||
txlength: info.tx.length,
|
||||
poolInfo: info.poolInfo
|
||||
});
|
||||
});
|
||||
}, function(err, allblocks) {
|
||||
|
|
|
@ -55,7 +55,9 @@
|
|||
</tr>
|
||||
<tr data-ng-show="block.poolInfo">
|
||||
<td><strong>Relayed by</strong></td>
|
||||
<td class="text-right text-muted"><a href="{{block.poolInfo.url}}" target="_blank" title="{{block.poolInfo.poolName}}">{{block.poolInfo.poolName}} <i class="glyphicon glyphicon-new-window"></i></a>
|
||||
<td class="text-right text-muted">
|
||||
<a href="{{block.poolInfo.url}}" target="_blank" title="{{block.poolInfo.poolName}}">{{block.poolInfo.poolName}}</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Merkle Root</strong></td>
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
<th>Height</th>
|
||||
<th>Timestamp</th>
|
||||
<th class="text-right">Transactions</th>
|
||||
<th class="text-right">Relayed by</th>
|
||||
<th class="text-right">Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -46,6 +47,7 @@
|
|||
<td><a href="/block/{{b.hash}}">{{b.height}}</a></td>
|
||||
<td>{{b.time * 1000 | date:'medium'}}</td>
|
||||
<td class="text-right">{{b.txlength}}</td>
|
||||
<td class="text-right"><a href="{{b.poolInfo.url}}" title="{{b.poolInfo.poolName}}" target="_blank" data-ng-show="b.poolInfo">{{b.poolInfo.poolName}}</a></td>
|
||||
<td class="text-right">{{b.size}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
<th>Height</th>
|
||||
<th>Age</th>
|
||||
<th class="text-right"><span class="ellipsis">Transactions</span></th>
|
||||
<th class="text-right"><span class="ellipsis">Relayed by</span></th>
|
||||
<th class="text-right">Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -24,6 +25,7 @@
|
|||
</td>
|
||||
<td><span class="ellipsis">{{humanSince(b.time)}}</span></td>
|
||||
<td class="text-right">{{b.txlength}}</td>
|
||||
<td class="text-right"><a href="{{b.poolInfo.url}}" title="{{b.poolInfo.poolName}}" target="_blank" data-ng-show="b.poolInfo">{{b.poolInfo.poolName}}</a></td>
|
||||
<td class="text-right">{{b.size}} bytes</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in New Issue