realtps
realtps copied to clipboard
Panic in esplora client
thread 'main' panicked at 'u64: ParseIntError { kind: InvalidDigit }', src/realtps_import/src/clients/esplora.rs:51:41
This crashed the entire import process. Need to handle panics better: https://github.com/Aimeedeer/realtps/issues/65
I'm disabling bitcoin for now.
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