Skip to content

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