Skip to content
Discussion options

You must be logged in to vote

we could add a helper future type for this that basically behaves like eth_syncing?

like this:

while canon_state.next().await.is_some() {
let current_syncing = self.inner.eth_api.network().is_syncing();
// Only send a new response if the sync status has changed
if current_syncing != initial_sync_status {
// Update the sync status on each new block
initial_sync_status = current_syncing;
// send a new message now that the status changed
let sync_status = self.sync_status(current_syncing);
let msg = SubscriptionMessage::new(
accepted_sink.method_name(),
accepte…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Dinonard
Comment options

Answer selected by Dinonard
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants