feat: add EventSource enum and optimize event processing threads

- Introduce EventSource enum (Grpc, Shred) for better event source management
- Refactor start_block_processing_thread to conditionally spawn threads based on source type
- Update callers to specify event source type
This commit is contained in:
ysq
2025-09-19 23:17:50 +08:00
parent 6af26232a0
commit 5acf69714d
3 changed files with 58 additions and 43 deletions
+1
View File
@@ -40,6 +40,7 @@ impl ShredStreamGrpc {
let mut event_processor =
EventProcessor::new(self.metrics_manager.clone(), self.config.clone());
event_processor.set_protocols_and_event_type_filter(
super::common::EventSource::Shred,
protocols,
event_type_filter,
self.config.backpressure.clone(),