Skip to content

Commit

Permalink
chore: adjusted lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
paulobressan committed Feb 3, 2025
1 parent 08c6239 commit 6dd9bc9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/pipeline/monitor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ impl gasket::framework::Worker<Stage> 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)
Expand All @@ -71,11 +73,7 @@ impl gasket::framework::Worker<Stage> 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);
Expand Down Expand Up @@ -105,7 +103,7 @@ impl gasket::framework::Worker<Stage> for Worker {
return tx;
}

tx.slot = Some(slot.clone());
tx.slot = Some(*slot);
tx
})
.collect();
Expand Down

0 comments on commit 6dd9bc9

Please sign in to comment.