1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 09:54:09 +01:00

Don't fail if wait_for_new_block RPC timeouts

Following #495.
This commit is contained in:
Roman Zeyde 2021-09-21 13:10:55 +03:00
parent 3041e89cd2
commit 492d6aa275

View File

@ -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)
}