Skip to content

Commit 3177e22

Browse files
author
Ludo Galabru
committed
fix: backpressure on traversals
1 parent fba5c89 commit 3177e22

File tree

1 file changed

+3
-3
lines changed
  • components/chainhook-event-observer/src/hord/db

1 file changed

+3
-3
lines changed

components/chainhook-event-observer/src/hord/db/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,11 @@ pub async fn fetch_and_cache_blocks_in_hord_db(
563563
) -> Result<(), String> {
564564
let number_of_blocks_to_process = end_block - start_block + 1;
565565
let retrieve_block_hash_pool = ThreadPool::new(network_thread);
566-
let (block_hash_tx, block_hash_rx) = crossbeam_channel::unbounded();
566+
let (block_hash_tx, block_hash_rx) = crossbeam_channel::bounded(128);
567567
let retrieve_block_data_pool = ThreadPool::new(network_thread);
568-
let (block_data_tx, block_data_rx) = crossbeam_channel::unbounded();
568+
let (block_data_tx, block_data_rx) = crossbeam_channel::bounded(64);
569569
let compress_block_data_pool = ThreadPool::new(8);
570-
let (block_compressed_tx, block_compressed_rx) = crossbeam_channel::unbounded();
570+
let (block_compressed_tx, block_compressed_rx) = crossbeam_channel::bounded(32);
571571
let first_inscription_block_height = 767430;
572572

573573
for block_cursor in start_block..=end_block {

0 commit comments

Comments
 (0)