mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-09 20:21:01 +00:00
feat: Pin Kusama (#171)
This commit is contained in:
@@ -3,7 +3,7 @@ import { Types, SortedCollection } from '@dotstats/common';
|
||||
import { AllChains, Chains, Chain, Ago, OfflineIndicator } from './components';
|
||||
import { Connection } from './Connection';
|
||||
import { PersistentObject, PersistentSet } from './persist';
|
||||
import { State, Node, ChainData } from './state';
|
||||
import { State, Node, ChainData, PINNED_CHAIN } from './state';
|
||||
import { getHashData } from './utils';
|
||||
import stable from 'stable';
|
||||
|
||||
@@ -158,11 +158,11 @@ export default class App extends React.Component<{}, State> {
|
||||
.inplace(
|
||||
Array.from(this.state.chains.entries()),
|
||||
(a, b) => {
|
||||
if (a[0] === 'Alexander') {
|
||||
if (a[0] === PINNED_CHAIN) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (b[0] === 'Alexander') {
|
||||
if (b[0] === PINNED_CHAIN) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { VERSION, timestamp, FeedMessage, Types, Maybe, sleep } from '@dotstats/common';
|
||||
import { State, Update, Node, UpdateBound } from './state';
|
||||
import { State, Update, Node, UpdateBound, PINNED_CHAIN } from './state';
|
||||
import { PersistentSet } from './persist';
|
||||
import { getHashData, setHashData } from './utils';
|
||||
import { AfgHandling } from './AfgHandling';
|
||||
@@ -416,7 +416,7 @@ export class Connection {
|
||||
let topCount: Types.NodeCount = 0 as Types.NodeCount;
|
||||
|
||||
for (const [label, count] of chains.entries()) {
|
||||
if (label === 'Alexander') {
|
||||
if (label === PINNED_CHAIN) {
|
||||
topLabel = label;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Types, Maybe, SortedCollection } from '@dotstats/common';
|
||||
|
||||
export const PINNED_CHAIN = 'Kusama CC1';
|
||||
|
||||
export class Node {
|
||||
public static compare(a: Node, b: Node): number {
|
||||
if (a.pinned === b.pinned && a.stale === b.stale) {
|
||||
|
||||
Reference in New Issue
Block a user