Skip to content

Commit a04711a

Browse files
author
Ludo Galabru
committed
fix: remove start logic
1 parent 8a5482c commit a04711a

File tree

3 files changed

+1
-19
lines changed

3 files changed

+1
-19
lines changed

components/ordhook-core/src/core/pipeline/processors/block_archiving.rs

-6
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ pub fn start_block_archiving_processor(
3636
let mut empty_cycles = 0;
3737
let mut processed_blocks = 0;
3838

39-
if let Ok(PostProcessorCommand::Start) = commands_rx.recv() {
40-
let _ = events_tx.send(PostProcessorEvent::Started);
41-
debug!(ctx.expect_logger(), "Start block indexing runloop");
42-
}
43-
4439
loop {
4540
debug!(ctx.expect_logger(), "Tick");
4641
let (compacted_blocks, _) = match commands_rx.try_recv() {
@@ -52,7 +47,6 @@ pub fn start_block_archiving_processor(
5247
let _ = events_tx.send(PostProcessorEvent::Terminated);
5348
break;
5449
}
55-
Ok(PostProcessorCommand::Start) => unreachable!(),
5650
Err(e) => match e {
5751
TryRecvError::Empty => {
5852
empty_cycles += 1;

components/ordhook-core/src/core/pipeline/processors/inscription_indexing.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ pub fn start_inscription_indexing_processor(
7272
open_readonly_ordhook_db_conn(&config.expected_cache_path(), &ctx).unwrap();
7373
let mut sequence_cursor = SequenceCursor::new(&inscriptions_db_conn);
7474

75-
if let Ok(PostProcessorCommand::Start) = commands_rx.recv() {
76-
let _ = events_tx.send(PostProcessorEvent::Started);
77-
debug!(ctx.expect_logger(), "Start inscription indexing runloop");
78-
}
79-
8075
loop {
8176
let (compacted_blocks, mut blocks) = match commands_rx.try_recv() {
8277
Ok(PostProcessorCommand::ProcessBlocks(compacted_blocks, blocks)) => {
@@ -88,11 +83,10 @@ pub fn start_inscription_indexing_processor(
8883
let _ = events_tx.send(PostProcessorEvent::Terminated);
8984
break;
9085
}
91-
Ok(PostProcessorCommand::Start) => unreachable!(),
9286
Err(e) => match e {
9387
TryRecvError::Empty => {
9488
empty_cycles += 1;
95-
if empty_cycles == 10 {
89+
if empty_cycles == 180 {
9690
warn!(ctx.expect_logger(), "Block processor reached expiration");
9791
let _ = events_tx.send(PostProcessorEvent::Expired);
9892
break;

components/ordhook-core/src/core/pipeline/processors/transfers_recomputing.rs

-6
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ pub fn start_transfers_recomputing_processor(
3737
open_readwrite_ordhook_db_conn(&config.expected_cache_path(), &ctx).unwrap();
3838
let mut empty_cycles = 0;
3939

40-
if let Ok(PostProcessorCommand::Start) = commands_rx.recv() {
41-
let _ = events_tx.send(PostProcessorEvent::Started);
42-
debug!(ctx.expect_logger(), "Start inscription indexing runloop");
43-
}
44-
4540
loop {
4641
let mut blocks = match commands_rx.try_recv() {
4742
Ok(PostProcessorCommand::ProcessBlocks(_, blocks)) => {
@@ -53,7 +48,6 @@ pub fn start_transfers_recomputing_processor(
5348
let _ = events_tx.send(PostProcessorEvent::Terminated);
5449
break;
5550
}
56-
Ok(PostProcessorCommand::Start) => unreachable!(),
5751
Err(e) => match e {
5852
TryRecvError::Empty => {
5953
empty_cycles += 1;

0 commit comments

Comments
 (0)