Update processor for latest Monero lib changes

This commit is contained in:
Luke Parker 2022-12-05 17:53:06 -05:00
parent f136328c08
commit a3adf16b8c
No known key found for this signature in database

View file

@ -150,8 +150,12 @@ impl Coin for Monero {
}
async fn is_confirmed(&self, tx: &[u8]) -> Result<bool, CoinError> {
let tx_block_number =
self.rpc.get_transaction_block_number(tx).await.map_err(|_| CoinError::ConnectionError)?;
let tx_block_number = self
.rpc
.get_transaction_block_number(tx)
.await
.map_err(|_| CoinError::ConnectionError)?
.unwrap_or(usize::MAX);
Ok((self.get_latest_block_number().await?.saturating_sub(tx_block_number) + 1) >= 10)
}