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

fetch justification every minute #2344

Merged
merged 3 commits into from
Jan 22, 2025
Merged

Conversation

turuslan
Copy link
Contributor

Referenced issues

Description of the Change

  • fetch justifications from random peer every minute
  • workaround finality lag when granpda protocol doesn't work

Possible Drawbacks

@turuslan turuslan requested review from xDimon and kamilsa January 21, 2025 10:56
turuslan and others added 2 commits January 21, 2025 16:57
}

// If no suitable peers were found, add all connected peers to the list
if (peers.empty()) {
Copy link
Member

@xDimon xDimon Jan 22, 2025

Choose a reason for hiding this comment

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

PeerIds of connected peers should be contained in peer repository, isn't it? This addition looks redundant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

First loop iterates ProtocolRepository and filters peers which have both connection and protocol.
First loop may return zero peers.
Second loop iterates ConnectionManager to get all connected peers.

@turuslan turuslan merged commit b160f64 into master Jan 22, 2025
13 checks passed
@turuslan turuslan deleted the fix/fetch-justification-every-minute branch January 22, 2025 10:55
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.

3 participants