Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: restart ws connection to rpc when it was dropped and sync lost blocks #227

Open
wants to merge 1 commit into
base: feat/improved-logs
Choose a base branch
from

Conversation

frolvanya
Copy link
Contributor

@frolvanya frolvanya commented Feb 4, 2025

We found an issue when connection can be dropped right when new event should be found, so we need to fetch everything from the last_processed_block
image
image


error!("{chain_kind:?} WebSocket stream closed unexpectedly, reconnecting...");
start_block = None;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is done to make sure that first start uses start_block (if it was provided as an argument) and then we need to switch back to using last_processed_block. Let me know if this should be refactored using better code practices

Also, same logic can be found in solana startup files

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.

1 participant