File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -1952,12 +1952,23 @@ impl Batcher {
19521952
19531953 // If batch finalization failed, restore the proofs to the queue
19541954 if let Err ( e) = batch_finalization_result {
1955- error ! (
1956- "Batch finalization failed, restoring proofs to queue: {:?}" ,
1957- e
1958- ) ;
1959- self . restore_proofs_after_batch_failure ( & finalized_batch)
1960- . await ;
1955+ error ! ( "Batch finalization failed: {:?}" , e) ;
1956+
1957+ // Don't restore proofs for insufficient balance errors - the queue was already flushed
1958+ match & e {
1959+ BatcherError :: TransactionSendError (
1960+ TransactionSendError :: SubmissionInsufficientBalance ( _) ,
1961+ ) => {
1962+ info ! (
1963+ "Queue was flushed due to insufficient balance - not restoring proofs"
1964+ ) ;
1965+ }
1966+ _ => {
1967+ info ! ( "Restoring proofs to queue after batch failure" ) ;
1968+ self . restore_proofs_after_batch_failure ( & finalized_batch)
1969+ . await ;
1970+ }
1971+ }
19611972 return Err ( e) ;
19621973 }
19631974 }
You can’t perform that action at this time.
0 commit comments