Skip to content

Commit eb9d481

Browse files
Use a loop+break instead of a control var
1 parent 073eee7 commit eb9d481

File tree

1 file changed

+2
-3
lines changed
  • aggregation_mode/src/backend

1 file changed

+2
-3
lines changed

aggregation_mode/src/backend/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,7 @@ impl ProofAggregator {
144144
// Iterate until we can send the proof on-chain
145145
let start_time = Instant::now();
146146

147-
let mut sent_proof = false;
148-
while !sent_proof {
147+
loop {
149148
// We add 24 hours because the proof aggregator runs once a day, so the time elapsed
150149
// should be considered over a 24h period.
151150
let time_elapsed: Duration =
@@ -167,7 +166,7 @@ impl ProofAggregator {
167166
receipt.transaction_hash
168167
);
169168

170-
sent_proof = true;
169+
break;
171170
} else {
172171
info!("Skipping sending proof to ProofAggregationService contract due to budget/time constraints.");
173172
}

0 commit comments

Comments
 (0)