Skip to content

Commit

Permalink
reduce channel length
Browse files Browse the repository at this point in the history
Signed-off-by: Eval EXEC <[email protected]>
  • Loading branch information
eval-exec committed Mar 21, 2024
1 parent 6b2d4a0 commit 3fa5e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chain/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::sync::atomic::AtomicBool;
use std::sync::Arc;
use std::thread;

const ORPHAN_BLOCK_SIZE: usize = (BLOCK_DOWNLOAD_WINDOW * 2) as usize;
const ORPHAN_BLOCK_SIZE: usize = (BLOCK_DOWNLOAD_WINDOW) as usize;

pub fn start_chain_services(builder: ChainServicesBuilder) -> ChainController {
let orphan_blocks_broker = Arc::new(OrphanBlockPool::with_capacity(ORPHAN_BLOCK_SIZE));
Expand Down Expand Up @@ -68,7 +68,7 @@ pub fn start_chain_services(builder: ChainServicesBuilder) -> ChainController {
})
.expect("start search_orphan_pool thread should ok");

let (process_block_tx, process_block_rx) = channel::bounded(BLOCK_DOWNLOAD_WINDOW as usize);
let (process_block_tx, process_block_rx) = channel::bounded(0);

let is_verifying_unverified_blocks_on_startup = Arc::new(AtomicBool::new(true));

Expand Down

0 comments on commit 3fa5e0a

Please sign in to comment.