Add shared folder

This commit is contained in:
maciejhirsz
2018-06-27 10:39:31 +02:00
parent 462cb8404f
commit 07a793cbb2
7 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import * as EventEmitter from 'events';
import Node from './node';
import Feed, { FeedData } from './feed';
import { Id, IdSet } from './utils';
import { Id, IdSet } from './shared';
export default class Aggregator extends EventEmitter {
private nodes: IdSet<Node> = new IdSet<Node>();
+1 -1
View File
@@ -1,7 +1,7 @@
import * as WebSocket from 'ws';
import * as EventEmitter from 'events';
import Node, { NodeInfo, BlockInfo } from './node';
import { Opaque, Id, idGenerator } from './utils';
import { Opaque, Id, idGenerator } from './shared';
const nextId = idGenerator<Feed>();
+1 -1
View File
@@ -4,7 +4,7 @@ import { createServer } from 'http';
import Node from './node';
import Feed from './feed';
import Aggregator from './aggregator';
import { map, join } from './utils';
import { map, join } from './shared';
const aggregator = new Aggregator;
const app = express();
+1 -1
View File
@@ -1,5 +1,5 @@
import { Data } from 'ws';
import { Maybe, Opaque } from './utils';
import { Maybe, Opaque } from './shared';
export function parseMessage(data: Data): Maybe<Message> {
try {
+1 -1
View File
@@ -1,6 +1,6 @@
import * as WebSocket from 'ws';
import * as EventEmitter from 'events';
import { Maybe, Id, idGenerator } from './utils';
import { Maybe, Id, idGenerator } from './shared';
import { parseMessage, getBestBlock, Message, BestBlock } from './message';
const BLOCK_TIME_HISTORY = 10;
+1
View File
@@ -0,0 +1 @@
../../shared