Send ping to the node

This commit is contained in:
maciejhirsz
2018-07-19 15:23:10 +02:00
parent 4bdbeb311d
commit 280e0f5c9c
3 changed files with 29 additions and 11 deletions
+2 -4
View File
@@ -2,7 +2,7 @@ import * as EventEmitter from 'events';
import Node from './Node';
import Feed from './Feed';
import FeedSet from './FeedSet';
import { timestamp, Maybe, Types, FeedMessage } from '@dotstats/common';
import { Maybe, Types, FeedMessage } from '@dotstats/common';
const BLOCK_TIME_HISTORY = 10;
@@ -69,9 +69,7 @@ export default class Chain {
return this.nodes.values();
}
public timeoutCheck() {
const now = timestamp();
public timeoutCheck(now: Types.Timestamp) {
for (const node of this.nodes.values()) {
node.timeoutCheck(now);
}