Compare commits
No commits in common. "bc8d91c183768a425c2702e071fce826765814dc" and "00cb9e5f425ed1a505a0b374621fc59bc83a8e11" have entirely different histories.
bc8d91c183
...
00cb9e5f42
@ -19,12 +19,6 @@ app.use(LazyLoad, { component: true });
|
||||
// Mount vue app
|
||||
app.mount('#app');
|
||||
|
||||
// fetch new block(s) on this interval, specified in miliseconds
|
||||
// note that the design of the block fetching code is such that it
|
||||
// will MISS BLOCKS if this interval is longer than the block time
|
||||
// TODO: make this configurable
|
||||
const blockFetchInterval = 2 * 1000;
|
||||
|
||||
// fetch latest block every 6s
|
||||
const blockStore = useBaseStore();
|
||||
const requestCounter = ref(0);
|
||||
@ -34,4 +28,4 @@ setInterval(() => {
|
||||
// max allowed request
|
||||
blockStore.fetchLatest().finally(() => (requestCounter.value -= 1));
|
||||
}
|
||||
}, blockFetchInterval);
|
||||
}, 6000);
|
||||
|
Loading…
Reference in New Issue
Block a user