Categorize nodes by chains

This commit is contained in:
maciejhirsz
2018-07-06 15:08:22 +02:00
parent ae009a7649
commit 9a8e625df6
18 changed files with 578 additions and 218 deletions
+4 -2
View File
@@ -1,11 +1,13 @@
import { Types } from '@dotstats/common';
import { Node } from './components/Node';
import { Types, Maybe } from '@dotstats/common';
export interface State {
best: Types.BlockNumber,
blockTimestamp: Types.Timestamp,
timeDiff: Types.Milliseconds,
nodes: Map<Types.NodeId, Node.Props>
subscribed: Maybe<Types.ChainLabel>,
chains: Set<Types.ChainLabel>,
nodes: Map<Types.NodeId, Node.Props>,
}
export type Update = <K extends keyof State>(changes: Pick<State, K> | null) => Readonly<State>;