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 check for other peers ahead and node stalled. #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JelliedOwl
Copy link

No description provided.

@JelliedOwl
Copy link
Author

Could I have improved this further? The call to api.rpc.system.peers() downloads quite a lot of data we don't need. Is there a way to request just part of the returned data structure, or do we have to have it all?

@JelliedOwl JelliedOwl marked this pull request as draft April 1, 2021 07:48
@JelliedOwl
Copy link
Author

Just notice that the last block number isn't being saved to the tmp file.

@JelliedOwl
Copy link
Author

In fact, not a bug. It only writes to the file when it's behind peers, and this didn't occur on my test machine.

@JelliedOwl JelliedOwl marked this pull request as ready for review April 1, 2021 07:57
@jnaviask
Copy link
Contributor

jnaviask commented Apr 1, 2021

Could I have improved this further? The call to api.rpc.system.peers() downloads quite a lot of data we don't need. Is there a way to request just part of the returned data structure, or do we have to have it all?

Unfortunately I think this is the only call that returns the peers' block number. I don't believe you can do a partial request.

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