File tree Expand file tree Collapse file tree 3 files changed +7
-14
lines changed
apollo_l1_provider_types/src Expand file tree Collapse file tree 3 files changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -231,6 +231,13 @@ impl L1Provider {
231231 ) ;
232232 } ) ;
233233 }
234+ Event :: TransactionCanceled ( event_data) => {
235+ // TODO(guyn): delete the transaction from the provider.
236+ info ! (
237+ "Cancellation finalized with data: {event_data:?}. THIS DOES NOT DELETE \
238+ THE TRANSACTION FROM THE PROVIDER YET."
239+ ) ;
240+ }
234241 Event :: TransactionConsumed { tx_hash, timestamp : consumed_at } => {
235242 if let Err ( previously_consumed_at) =
236243 self . tx_manager . consume_tx ( tx_hash, consumed_at, self . clock . unix_now ( ) )
@@ -241,7 +248,6 @@ impl L1Provider {
241248 ) ;
242249 }
243250 }
244- _ => return Err ( L1ProviderError :: unsupported_l1_event ( event) ) ,
245251 }
246252 }
247253 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -424,13 +424,6 @@ fn handle_client_error<B: BaseLayerContract + Send + Sync>(
424424 L1ProviderClientError :: L1ProviderError ( L1ProviderError :: Uninitialized ) => {
425425 Err ( L1ScraperError :: NeedsRestart )
426426 }
427- L1ProviderClientError :: L1ProviderError ( L1ProviderError :: UnsupportedL1Event ( event) ) => {
428- panic ! (
429- "Scraper-->Provider consistency error: the event {event} is not supported by the \
430- provider, but has been scraped and sent to it nonetheless. Check the list of \
431- tracked events in the scraper and compare to the provider's."
432- )
433- }
434427 error => panic ! ( "Unexpected error: {error}" ) ,
435428 }
436429}
Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ pub enum L1ProviderError {
2626 UnexpectedHeight { expected_height : BlockNumber , got : BlockNumber } ,
2727 #[ error( "Cannot transition from {from} to {to}" ) ]
2828 UnexpectedProviderStateTransition { from : String , to : String } ,
29- #[ error( "L1 event not supported: {0}" ) ]
30- UnsupportedL1Event ( String ) ,
3129 #[ error( "`validate` called while in `Propose` state" ) ]
3230 ValidateTransactionConsensusBug ,
3331}
@@ -36,10 +34,6 @@ impl L1ProviderError {
3634 pub fn unexpected_transition ( from : impl ToString , to : impl ToString ) -> Self {
3735 Self :: UnexpectedProviderStateTransition { from : from. to_string ( ) , to : to. to_string ( ) }
3836 }
39-
40- pub fn unsupported_l1_event ( event : Event ) -> Self {
41- Self :: UnsupportedL1Event ( event. to_string ( ) )
42- }
4337}
4438
4539#[ derive( Clone , Debug , Error ) ]
You can’t perform that action at this time.
0 commit comments