Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # packages/api/src/dao/TransactionsDAO.js
pshenmic
requested changes
Oct 8, 2025
| } | ||
|
|
||
| subscribeBlockWithTransactions = async (request, response) => { | ||
| await checkSSEConditions(this.redis, this.blocksDAO) |
Owner
There was a problem hiding this comment.
If redis is available, then we can use it, I think we can do it by conditionally passing the redis in the constructor, and handle optionality on creation level
| response.raw.writeHead(200, SSE_HEAD) | ||
|
|
||
| const redis = await this.redis.duplicate() | ||
| await redis.connect() |
Owner
There was a problem hiding this comment.
I think that should handled in the separate RedisClient class
pshenmic
requested changes
Oct 9, 2025
Comment on lines
+12
to
+13
| if last_block_height > current_block_height + 10 { | ||
| self.processor.set_indexing_flag(true).await; |
Owner
There was a problem hiding this comment.
Use catchingUp from tenderdash RPC
| await this.redis.subscribeMessages(callback) | ||
|
|
||
| // initialize sse | ||
| response.sse({ data: JSON.stringify({ status: 'ok' }) }) |
Owner
There was a problem hiding this comment.
Let's return current block in as first message
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dependent #716
Issue
We need to implement endpoints with SSE which allows to get in real time updates of indexer
Things done
keep-aliveconnectionImplemented events based blocks pool, which allows blocks to be sent in the correct order, otherwise the sending order will be disrupted due to different waiting times for several blocks with consecutive transactions or any other delaysImplementedgetBlockWithTransactionforBlocksDAORedisConnection, which allows to interact with redis via only 2 connections