File tree Expand file tree Collapse file tree
aggregation_mode/proof_aggregator/src/backend Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,10 @@ pub enum AggregatedProofSubmissionError {
5555}
5656
5757enum SubmitOutcome {
58- Confirmed ( TransactionReceipt ) ,
58+ // NOTE: Boxed because enums are sized to their largest variant; without boxing,
59+ // every `SubmitOutcome` would reserve space for a full `TransactionReceipt`,
60+ // even in the `Pending` case (see clippy::large_enum_variant).
61+ Confirmed ( Box < TransactionReceipt > ) ,
5962 Pending ( TxHash ) ,
6063}
6164
@@ -380,7 +383,7 @@ impl ProofAggregator {
380383 "Transaction confirmed successfully on attempt {}" ,
381384 attempt + 1
382385 ) ;
383- return Ok ( receipt) ;
386+ return Ok ( * receipt) ;
384387 }
385388 Ok ( SubmitOutcome :: Pending ( tx_hash) ) => {
386389 warn ! (
@@ -556,7 +559,7 @@ impl ProofAggregator {
556559 let receipt_result = tokio:: time:: timeout ( retry_interval, pending_tx. get_receipt ( ) ) . await ;
557560
558561 match receipt_result {
559- Ok ( Ok ( receipt) ) => Ok ( SubmitOutcome :: Confirmed ( receipt) ) ,
562+ Ok ( Ok ( receipt) ) => Ok ( SubmitOutcome :: Confirmed ( Box :: new ( receipt) ) ) ,
560563 Ok ( Err ( err) ) => Err (
561564 AggregatedProofSubmissionError :: SendVerifyAggregatedProofTransaction ( format ! (
562565 "Error getting receipt: {err}"
You can’t perform that action at this time.
0 commit comments