File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ impl BlockBuilder {
143143 }
144144 }
145145
146+ /// Fetches transactions from the cache and ingests them into the in progress block
146147 async fn get_transactions ( & mut self , in_progress : & mut InProgressBlock ) {
147148 tracing:: trace!( "query transactions from cache" ) ;
148149 let txns = self . tx_poller . check_tx_cache ( ) . await ;
@@ -159,7 +160,14 @@ impl BlockBuilder {
159160 }
160161 }
161162
163+ /// Fetches bundles from the cache and ingests them into the in progress block
162164 async fn get_bundles ( & mut self , host_provider : & Provider , in_progress : & mut InProgressBlock ) {
165+ // Authenticate before fetching to ensure access to a valid token
166+ if let Err ( err) = self . bundle_poller . authenticator . authenticate ( ) . await {
167+ tracing:: error!( err = %err, "bundle fetcher failed to authenticate" ) ;
168+ return ;
169+ }
170+
163171 tracing:: trace!( "query bundles from cache" ) ;
164172 let bundles = self . bundle_poller . check_bundle_cache ( ) . await ;
165173 // OPTIMIZE: Sort bundles received from cache
You can’t perform that action at this time.
0 commit comments