limit live transactions in the homepage
This commit is contained in:
parent
15c9062771
commit
4e88c6fe5d
@ -31,12 +31,12 @@ angular.module('insight.system').controller('IndexController',
|
|||||||
|
|
||||||
socket.on('tx', function(tx) {
|
socket.on('tx', function(tx) {
|
||||||
var txStr = tx.txid.toString();
|
var txStr = tx.txid.toString();
|
||||||
|
_getTransaction(txStr);
|
||||||
|
|
||||||
console.log('Transaction received! ' + JSON.stringify(tx));
|
console.log('Transaction received! ' + JSON.stringify(tx));
|
||||||
if (parseInt($scope.txs.length, 10) > parseInt(TRANSACTION_DISPLAYED, 10) - 1) {
|
if (parseInt($scope.txs.length, 10) > parseInt(TRANSACTION_DISPLAYED, 10)) {
|
||||||
$scope.txs = $scope.txs.slice(Math.max($scope.txs.length - TRANSACTION_DISPLAYED, 1));
|
$scope.txs = $scope.txs.slice(Math.max($scope.txs.length - TRANSACTION_DISPLAYED, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
_getTransaction(txStr);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
socket.on('block', function(block) {
|
socket.on('block', function(block) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user