Corrections for recent processor commit

This commit is contained in:
Luke Parker
2023-07-03 12:45:08 -04:00
parent 3480b3cdc2
commit 06bbc5b1cf

View File

@@ -254,13 +254,13 @@ impl Coin for Monero {
} }
async fn get_block(&self, number: usize) -> Result<Self::Block, CoinError> { async fn get_block(&self, number: usize) -> Result<Self::Block, CoinError> {
Ok(Block( Ok(
self self
.rpc .rpc
.get_block(self.rpc.get_block_hash(number).await.map_err(|_| CoinError::ConnectionError)?) .get_block(self.rpc.get_block_hash(number).await.map_err(|_| CoinError::ConnectionError)?)
.await .await
.map_err(|_| CoinError::ConnectionError)?, .map_err(|_| CoinError::ConnectionError)?,
)) )
} }
async fn get_outputs( async fn get_outputs(
@@ -269,7 +269,7 @@ impl Coin for Monero {
key: EdwardsPoint, key: EdwardsPoint,
) -> Result<Vec<Self::Output>, CoinError> { ) -> Result<Vec<Self::Output>, CoinError> {
let mut txs = Self::scanner(key) let mut txs = Self::scanner(key)
.scan(&self.rpc, &block.1) .scan(&self.rpc, block)
.await .await
.map_err(|_| CoinError::ConnectionError)? .map_err(|_| CoinError::ConnectionError)?
.iter() .iter()
@@ -309,8 +309,6 @@ impl Coin for Monero {
eventualities: &mut EventualitiesTracker<Eventuality>, eventualities: &mut EventualitiesTracker<Eventuality>,
block: &Block, block: &Block,
) -> HashMap<[u8; 32], [u8; 32]> { ) -> HashMap<[u8; 32], [u8; 32]> {
let block = &block.1;
let mut res = HashMap::new(); let mut res = HashMap::new();
if eventualities.map.is_empty() { if eventualities.map.is_empty() {
return res; return res;
@@ -359,7 +357,7 @@ impl Coin for Monero {
block.unwrap() block.unwrap()
}; };
check_block(self, eventualities, &block.1, &mut res).await; check_block(self, eventualities, &block, &mut res).await;
} }
// Also check the current block // Also check the current block