Skip to content

Commit

Permalink
speeding up streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
harpagon210 committed Apr 13, 2019
1 parent aa5fc1b commit 775f20a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/Streamer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ForkException {
}

class Streamer {
constructor(nodeUrl, currentBlock, antiForkBufferMaxSize = 2, pollingTime = 500) {
constructor(nodeUrl, currentBlock, antiForkBufferMaxSize = 2, pollingTime = 100) {
this.antiForkBufferMaxSize = antiForkBufferMaxSize;
this.buffer = new Queue(antiForkBufferMaxSize);
this.blocks = new Queue();
Expand All @@ -35,7 +35,7 @@ class Streamer {
try {
const globProps = await this.client.database.getDynamicGlobalProperties();
this.headBlockNumber = globProps.head_block_number;
this.updaterGlobalProps = setTimeout(() => this.updateGlobalProps(), 3000);
this.updaterGlobalProps = setTimeout(() => this.updateGlobalProps(), 10000);
} catch (ex) {
console.error('An error occured while trying to fetch the Steem blockchain global properties'); // eslint-disable-line no-console
}
Expand Down

0 comments on commit 775f20a

Please sign in to comment.