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 {
143
143
}
144
144
}
145
145
146
+ /// Fetches transactions from the cache and ingests them into the in progress block
146
147
async fn get_transactions ( & mut self , in_progress : & mut InProgressBlock ) {
147
148
tracing:: trace!( "query transactions from cache" ) ;
148
149
let txns = self . tx_poller . check_tx_cache ( ) . await ;
@@ -159,7 +160,14 @@ impl BlockBuilder {
159
160
}
160
161
}
161
162
163
+ /// Fetches bundles from the cache and ingests them into the in progress block
162
164
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
+
163
171
tracing:: trace!( "query bundles from cache" ) ;
164
172
let bundles = self . bundle_poller . check_bundle_cache ( ) . await ;
165
173
// OPTIMIZE: Sort bundles received from cache
You can’t perform that action at this time.
0 commit comments