Open brson opened 1 year ago
async fn get_latest_block_number(&self) -> Result<u64> {
let block_number = reqwest::get(format!("{}/{}", self.url, "blocks/tip/height"))
.await?
.text()
.await?;
Ok(u64::from_str(&block_number).expect("u64"))
}
This code should error if the block can't parse.
In general it looks like we never check that status of HTTP reqwest
responses: https://github.com/Aimeedeer/realtps/issues/72
This crashed the entire import process. Need to handle panics better: https://github.com/Aimeedeer/realtps/issues/65
I'm disabling bitcoin for now.