Skip to content

fix: update query stake using indexer as priority - #47

Merged
azam-ismail merged 2 commits into
masterfrom
fix/query-stake
May 21, 2026
Merged

fix: update query stake using indexer as priority#47
azam-ismail merged 2 commits into
masterfrom
fix/query-stake

Conversation

@azam-ismail

Copy link
Copy Markdown
Collaborator

No description provided.

@azam-ismail
azam-ismail requested a review from kim-energyweb May 21, 2026 03:15
@azam-ismail
azam-ismail requested a review from hejkerooo as a code owner May 21, 2026 03:15

@hejkerooo hejkerooo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to use Indexer for it, just some small cleanup required

Comment thread src/util/indexer-queries.ts Outdated
Comment thread src/util/indexer-queries.ts Outdated
Comment thread src/solution.ts Outdated
Comment thread src/util/indexer-queries.ts Outdated

@hejkerooo hejkerooo left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check also for squidStatus - there is a finalizedHeight property. If this is outdated (i.e. 50 blocks behind, should be configurable), you should not treat Indexer as source of truth, instead use RPC. Please implement one method that checks if Indexer is healthy so it can be re-used, maybe with some small cache like 5 seconds.

Comment thread src/util/indexer-queries.ts Outdated
@azam-ismail
azam-ismail merged commit c34773c into master May 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants