Skip to content

Commit c155901

Browse files
committed
Add comments
1 parent 68547c7 commit c155901

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crates/batcher/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,14 +2029,16 @@ impl Batcher {
20292029
warn!("Failed to send task status to telemetry: {:?}", e);
20302030
}
20312031

2032-
// decide if i want to flush the queue:
20332032
match e {
2033+
// This should never happen, there is a task that regularly cleans up
2034+
// user proofs with unlocked states
2035+
// (and it runs more frequently than the 1H the user needs to withdraw funds)
20342036
BatcherError::TransactionSendError(
20352037
TransactionSendError::SubmissionInsufficientBalance(address),
20362038
) => {
2039+
// In the future we could do a more granular recovery
20372040
warn!("User {:?} has insufficient balance, flushing entire queue as safety measure", address);
2038-
// TODO: In the future, we should re-add the failed batch back to the queue
2039-
// For now, we flush everything as a safety measure
2041+
20402042
self.flush_queue_and_clear_nonce_cache().await;
20412043
}
20422044
_ => {

0 commit comments

Comments
 (0)