Skip to content

Commit

Permalink
Don't fail if wait_for_new_block RPC timeouts
Browse files Browse the repository at this point in the history
Following romanz#495.
  • Loading branch information
romanz committed Sep 21, 2021
1 parent 3041e89 commit 492d6aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ fn tip_receiver(config: &Config) -> Result<Receiver<BlockHash>> {
Ok(_) | Err(TrySendError::Full(_)) => (),
Err(TrySendError::Disconnected(_)) => bail!("tip receiver disconnected"),
}
rpc.wait_for_new_block(duration)?;
if let Err(err) = rpc.wait_for_new_block(duration) {
warn!(
"waiting {:.1}s for new block failed: {}",
duration as f64 / 1e3,
err
);
}
});
Ok(tip_rx)
}
Expand Down

0 comments on commit 492d6aa

Please sign in to comment.