mirror of
https://github.com/mempool/mempool.git
synced 2025-01-19 05:34:03 +01:00
Sort asn numerically - add few more top 10 isp in warm cache
This commit is contained in:
parent
cec8445223
commit
6327ce7c89
@ -417,24 +417,24 @@ class NodesApi {
|
||||
|
||||
if (!ispList[isp1]) {
|
||||
ispList[isp1] = {
|
||||
id: channel.isp1ID.toString(),
|
||||
ids: [channel.isp1ID],
|
||||
capacity: 0,
|
||||
channels: 0,
|
||||
nodes: {},
|
||||
};
|
||||
} else if (ispList[isp1].id.indexOf(channel.isp1ID) === -1) {
|
||||
ispList[isp1].id += ',' + channel.isp1ID.toString();
|
||||
} else if (ispList[isp1].ids.includes(channel.isp1ID) === false) {
|
||||
ispList[isp1].ids.push(channel.isp1ID);
|
||||
}
|
||||
|
||||
if (!ispList[isp2]) {
|
||||
ispList[isp2] = {
|
||||
id: channel.isp2ID.toString(),
|
||||
ids: [channel.isp2ID],
|
||||
capacity: 0,
|
||||
channels: 0,
|
||||
nodes: {},
|
||||
};
|
||||
} else if (ispList[isp2].id.indexOf(channel.isp2ID) === -1) {
|
||||
ispList[isp2].id += ',' + channel.isp2ID.toString();
|
||||
} else if (ispList[isp2].ids.includes(channel.isp2ID) === false) {
|
||||
ispList[isp2].ids.push(channel.isp2ID);
|
||||
}
|
||||
|
||||
ispList[isp1].capacity += channel.capacity;
|
||||
@ -444,11 +444,11 @@ class NodesApi {
|
||||
ispList[isp2].channels += 1;
|
||||
ispList[isp2].nodes[channel.node2PublicKey] = true;
|
||||
}
|
||||
|
||||
|
||||
const ispRanking: any[] = [];
|
||||
for (const isp of Object.keys(ispList)) {
|
||||
ispRanking.push([
|
||||
ispList[isp].id,
|
||||
ispList[isp].ids.sort((a, b) => a - b).join(','),
|
||||
isp,
|
||||
ispList[isp].capacity,
|
||||
ispList[isp].channels,
|
||||
|
@ -95,7 +95,7 @@ do for url in / \
|
||||
'/api/v1/lightning/statistics/3y' \
|
||||
'/api/v1/lightning/statistics/all' \
|
||||
'/api/v1/lightning/nodes/isp-ranking' \
|
||||
'/api/v1/lightning/nodes/isp/396982,15169' `# Google` \
|
||||
'/api/v1/lightning/nodes/isp/15169,396982' `# Google` \
|
||||
'/api/v1/lightning/nodes/isp/14618,16509' `# Amazon` \
|
||||
'/api/v1/lightning/nodes/isp/39572' `# DataWeb` \
|
||||
'/api/v1/lightning/nodes/isp/14061' `# Digital Ocean` \
|
||||
@ -107,12 +107,15 @@ do for url in / \
|
||||
'/api/v1/lightning/nodes/isp/34197' `# SHRD SARL` \
|
||||
'/api/v1/lightning/nodes/isp/42275' `# Three Fourteen SASU` \
|
||||
'/api/v1/lightning/nodes/isp/16276' `# OVH SAS` \
|
||||
'/api/v1/lightning/nodes/isp/11426,11427,20001,20115,11351,10796,33363,12271' `# Spectrum` \
|
||||
'/api/v1/lightning/nodes/isp/10796,11351,11426,11427,12271,20001,20115,33363' `# Spectrum` \
|
||||
'/api/v1/lightning/nodes/isp/701' `# Verizon` \
|
||||
'/api/v1/lightning/nodes/isp/12876' `# Scaleway` \
|
||||
'/api/v1/lightning/nodes/isp/33915' `# Ziggo` \
|
||||
'/api/v1/lightning/nodes/isp/3320' `# Deutsche Telekom AG` \
|
||||
'/api/v1/lightning/nodes/isp/8075' `# Microsoft Azure` \
|
||||
'/api/v1/lightning/nodes/isp/212531', `# UAB Interneto vizija` \
|
||||
'/api/v1/lightning/nodes/isp/63949', `# Linode` \
|
||||
'/api/v1/lightning/nodes/isp/51167', `# Contabo GmbH` \
|
||||
'/api/v1/lightning/nodes/countries' \
|
||||
'/api/v1/lightning/nodes/rankings' \
|
||||
'/api/v1/lightning/nodes/rankings/liquidity' \
|
||||
|
Loading…
Reference in New Issue
Block a user