@@ -284,6 +284,44 @@ pub fn load_and_process_ledger(
284
284
} ;
285
285
286
286
let exit = Arc :: new ( AtomicBool :: new ( false ) ) ;
287
+
288
+ let enable_rpc_transaction_history = arg_matches. is_present ( "enable_rpc_transaction_history" ) ;
289
+
290
+ let ( transaction_status_sender, transaction_status_service) = if geyser_plugin_active
291
+ || enable_rpc_transaction_history
292
+ {
293
+ // Need Primary (R/W) access to insert transaction data;
294
+ // obtain Primary access if we do not already have it
295
+ let tss_blockstore = if enable_rpc_transaction_history && !blockstore. is_primary_access ( ) {
296
+ Arc :: new ( open_blockstore (
297
+ blockstore. ledger_path ( ) ,
298
+ arg_matches,
299
+ AccessType :: PrimaryForMaintenance ,
300
+ ) )
301
+ } else {
302
+ blockstore. clone ( )
303
+ } ;
304
+
305
+ let ( transaction_status_sender, transaction_status_receiver) = unbounded ( ) ;
306
+ let transaction_status_service = TransactionStatusService :: new (
307
+ transaction_status_receiver,
308
+ Arc :: default ( ) ,
309
+ enable_rpc_transaction_history,
310
+ transaction_notifier,
311
+ tss_blockstore,
312
+ arg_matches. is_present ( "enable_extended_tx_metadata_storage" ) ,
313
+ exit. clone ( ) ,
314
+ ) ;
315
+ (
316
+ Some ( TransactionStatusSender {
317
+ sender : transaction_status_sender,
318
+ } ) ,
319
+ Some ( transaction_status_service) ,
320
+ )
321
+ } else {
322
+ ( transaction_status_sender, None )
323
+ } ;
324
+
287
325
let ( bank_forks, leader_schedule_cache, starting_snapshot_hashes, ..) =
288
326
bank_forks_utils:: load_bank_forks (
289
327
genesis_config,
@@ -320,7 +358,6 @@ pub fn load_and_process_ledger(
320
358
}
321
359
}
322
360
BlockVerificationMethod :: UnifiedScheduler => {
323
- let no_transaction_status_sender = None ;
324
361
let no_replay_vote_sender = None ;
325
362
let ignored_prioritization_fee_cache = Arc :: new ( PrioritizationFeeCache :: new ( 0u64 ) ) ;
326
363
bank_forks
@@ -329,7 +366,7 @@ pub fn load_and_process_ledger(
329
366
. install_scheduler_pool ( DefaultSchedulerPool :: new_dyn (
330
367
unified_scheduler_handler_threads,
331
368
process_options. runtime_config . log_messages_bytes_limit ,
332
- no_transaction_status_sender ,
369
+ transaction_status_sender . clone ( ) ,
333
370
no_replay_vote_sender,
334
371
ignored_prioritization_fee_cache,
335
372
) ) ;
@@ -369,43 +406,6 @@ pub fn load_and_process_ledger(
369
406
process_options. accounts_db_test_hash_calculation ,
370
407
) ;
371
408
372
- let enable_rpc_transaction_history = arg_matches. is_present ( "enable_rpc_transaction_history" ) ;
373
-
374
- let ( transaction_status_sender, transaction_status_service) = if geyser_plugin_active
375
- || enable_rpc_transaction_history
376
- {
377
- // Need Primary (R/W) access to insert transaction data;
378
- // obtain Primary access if we do not already have it
379
- let tss_blockstore = if enable_rpc_transaction_history && !blockstore. is_primary_access ( ) {
380
- Arc :: new ( open_blockstore (
381
- blockstore. ledger_path ( ) ,
382
- arg_matches,
383
- AccessType :: PrimaryForMaintenance ,
384
- ) )
385
- } else {
386
- blockstore. clone ( )
387
- } ;
388
-
389
- let ( transaction_status_sender, transaction_status_receiver) = unbounded ( ) ;
390
- let transaction_status_service = TransactionStatusService :: new (
391
- transaction_status_receiver,
392
- Arc :: default ( ) ,
393
- enable_rpc_transaction_history,
394
- transaction_notifier,
395
- tss_blockstore,
396
- arg_matches. is_present ( "enable_extended_tx_metadata_storage" ) ,
397
- exit. clone ( ) ,
398
- ) ;
399
- (
400
- Some ( TransactionStatusSender {
401
- sender : transaction_status_sender,
402
- } ) ,
403
- Some ( transaction_status_service) ,
404
- )
405
- } else {
406
- ( transaction_status_sender, None )
407
- } ;
408
-
409
409
let result = blockstore_processor:: process_blockstore_from_root (
410
410
blockstore. as_ref ( ) ,
411
411
& bank_forks,
0 commit comments