File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
crates/apollo_l1_provider/src Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,13 @@ impl L1Provider {
7272 start_height : None ,
7373 }
7474 }
75+ pub fn reset_bootstrapper ( & mut self ) {
76+ self . bootstrapper = Bootstrapper :: new (
77+ self . bootstrapper . l1_provider_client . clone ( ) ,
78+ self . bootstrapper . sync_client . clone ( ) ,
79+ self . config . startup_sync_sleep_retry_interval_seconds ,
80+ ) ;
81+ }
7582 // Functions Called by the scraper.
7683
7784 // Start the provider, get first-scrape events, start L2 sync.
@@ -323,6 +330,7 @@ impl L1Provider {
323330
324331 /// Go from current state to Bootstrap state and start the L2 sync.
325332 pub fn start_bootstrapping ( & mut self , target_height : BlockNumber ) {
333+ self . reset_bootstrapper ( ) ;
326334 self . state = ProviderState :: Bootstrap ;
327335 self . bootstrapper . start_l2_sync ( self . current_height , target_height) ;
328336 }
Original file line number Diff line number Diff line change @@ -375,7 +375,8 @@ async fn commit_block_backlog() {
375375 . build_into_l1_provider ( ) ;
376376
377377 l1_provider. initialize ( STARTUP_HEIGHT , vec ! [ ] ) . await . expect ( "l1 provider initialize failed" ) ;
378- commit_block_expect_error_just_to_start_bootstrapping ( & mut l1_provider, TARGET_HEIGHT ) ;
378+ l1_provider. state = ProviderState :: Bootstrap ;
379+ l1_provider. bootstrapper . start_l2_sync ( STARTUP_HEIGHT , TARGET_HEIGHT ) ;
379380
380381 // Test.
381382 // Commit height is below target height. Doesn't trigger backlog.
You can’t perform that action at this time.
0 commit comments