mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-09 20:21:01 +00:00
feat: pin Alexander as start of telemetry (#156)
This commit is contained in:
@@ -403,6 +403,11 @@ export class Connection {
|
||||
let topCount: Types.NodeCount = 0 as Types.NodeCount;
|
||||
|
||||
for (const [label, count] of chains.entries()) {
|
||||
if (label === 'Alexander') {
|
||||
topLabel = label;
|
||||
break;
|
||||
}
|
||||
|
||||
if (count > topCount) {
|
||||
topLabel = label;
|
||||
topCount = count;
|
||||
|
||||
@@ -52,7 +52,17 @@ export class Chains extends React.Component<Chains.Props, {}> {
|
||||
return stable
|
||||
.inplace(
|
||||
Array.from(this.props.chains.entries()),
|
||||
(a, b) => b[1] - a[1]
|
||||
(a, b) => {
|
||||
if (a[0] === 'Alexander') {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (b[0] === 'Alexander') {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return b[1] - a[1];
|
||||
}
|
||||
)
|
||||
.map(([label, nodeCount]) => ({ label, nodeCount }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user