From 6dd9bc9524f4185bd1c0a397ca45c60135f00842 Mon Sep 17 00:00:00 2001 From: paulobressan Date: Mon, 3 Feb 2025 17:04:19 -0300 Subject: [PATCH] chore: adjusted lint warning --- src/pipeline/monitor/mod.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pipeline/monitor/mod.rs b/src/pipeline/monitor/mod.rs index b3346e2..f60ea16 100644 --- a/src/pipeline/monitor/mod.rs +++ b/src/pipeline/monitor/mod.rs @@ -61,8 +61,10 @@ impl gasket::framework::Worker for Worker { match unit { Event::RollForward(slot, txs) => { // TODO: validate slot tx "timeout" + // TODO: change tx to rejected when reach the quantity of attempts. + // fanout will try N quantity - // TODO: analyse possible problem to get all inflight data + // TODO: analyse possible problem with the query to get all inflight data let txs_in_flight = stage .storage .find(TransactionStatus::InFlight) @@ -71,11 +73,7 @@ impl gasket::framework::Worker for Worker { let txs_to_confirm = txs_in_flight .into_iter() - .filter(|itx| { - txs.iter() - .find(|tx| hex::encode(&tx.hash) == itx.id) - .is_some() - }) + .filter(|itx| txs.iter().any(|tx| hex::encode(&tx.hash) == itx.id)) .map(|mut tx| { tx.status = TransactionStatus::Confirmed; tx.slot = Some(*slot); @@ -105,7 +103,7 @@ impl gasket::framework::Worker for Worker { return tx; } - tx.slot = Some(slot.clone()); + tx.slot = Some(*slot); tx }) .collect();