mirror of
https://github.com/serai-dex/serai.git
synced 2025-01-18 16:55:16 +00:00
Update processor for latest Monero lib changes
This commit is contained in:
parent
f136328c08
commit
a3adf16b8c
1 changed files with 6 additions and 2 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue