protected override void SubscribeToEventBus(CancellationToken stoppingToken) { invalidTxDetectedSubscription = eventBus.Subscribe <InvalidTxDetectedEvent>(); removedFromMempoolSubscription = eventBus.Subscribe <RemovedFromMempoolEvent>(); _ = invalidTxDetectedSubscription.ProcessEventsAsync(stoppingToken, logger, InvalidTxDetectedAsync); _ = removedFromMempoolSubscription.ProcessEventsAsync(stoppingToken, logger, RemovedFromMempoolEventAsync); }
protected override void SubscribeToEventBus(CancellationToken stoppingToken) { newBlockDiscoveredSubscription = eventBus.Subscribe <NewBlockDiscoveredEvent>(); newBlockAvailableInDBSubscription = eventBus.Subscribe <NewBlockAvailableInDB>(); _ = newBlockDiscoveredSubscription.ProcessEventsAsync(stoppingToken, logger, NewBlockDiscoveredAsync); _ = newBlockAvailableInDBSubscription.ProcessEventsAsync(stoppingToken, logger, ParseBlockForTransactionsAsync); }
protected override void SubscribeToEventBus(CancellationToken stoppingToken) { // subscribe to node events nodeAddedSubscription = eventBus.Subscribe <NodeAddedEvent>(); nodeDeletedSubscription = eventBus.Subscribe <NodeDeletedEvent>(); _ = nodeAddedSubscription.ProcessEventsAsync(stoppingToken, logger, NodeRepositoryNodeAddedAsync); _ = nodeDeletedSubscription.ProcessEventsAsync(stoppingToken, logger, NodeRepositoryDeletedEventAsync); }
protected override void SubscribeToEventBus(CancellationToken stoppingToken) { newNotificationEventSubscription = eventBus.Subscribe <NewNotificationEvent>(); _ = newNotificationEventSubscription.ProcessEventsAsync(stoppingToken, logger, ProcessNotificationAsync); }
protected override void SubscribeToEventBus(CancellationToken stoppingToken) { newBlockDiscoveredSubscription = eventBus.Subscribe <NewBlockDiscoveredEvent>(); _ = newBlockDiscoveredSubscription.ProcessEventsAsync(stoppingToken, logger, NewBlockDiscoveredAsync); }