diff --git a/binaries/cuprated/src/blockchain/free.rs b/binaries/cuprated/src/blockchain/free.rs index b32bb733..d44d273c 100644 --- a/binaries/cuprated/src/blockchain/free.rs +++ b/binaries/cuprated/src/blockchain/free.rs @@ -64,14 +64,14 @@ pub async fn handle_incoming_block( .collect::>() .map_err(IncomingBlockError::InvalidBlock)?; - if !BLOCKS_BEING_HANDLED.get_or_init(|| Mutex::new(HashSet::new())).lock().unwrap().insert(block_hash) { - return Ok(false); - } - let Some(incoming_block_tx) = INCOMING_BLOCK_TX.get() else { return Ok(false); }; + if !BLOCKS_BEING_HANDLED.get_or_init(|| Mutex::new(HashSet::new())).lock().unwrap().insert(block_hash) { + return Ok(false); + } + let (response_tx, response_rx) = oneshot::channel(); incoming_block_tx diff --git a/binaries/cuprated/src/blockchain/manager/commands.rs b/binaries/cuprated/src/blockchain/manager/commands.rs index c60c7ef0..800144f0 100644 --- a/binaries/cuprated/src/blockchain/manager/commands.rs +++ b/binaries/cuprated/src/blockchain/manager/commands.rs @@ -11,6 +11,4 @@ pub enum BlockchainManagerCommand { prepped_txs: HashMap<[u8; 32], TransactionVerificationData>, response_tx: oneshot::Sender>, }, - - PopBlocks, } diff --git a/binaries/cuprated/src/blockchain/manager/handler.rs b/binaries/cuprated/src/blockchain/manager/handler.rs index 50268761..6a92ba73 100644 --- a/binaries/cuprated/src/blockchain/manager/handler.rs +++ b/binaries/cuprated/src/blockchain/manager/handler.rs @@ -35,7 +35,6 @@ impl super::BlockchainManager { drop(response_tx.send(res)); } - BlockchainManagerCommand::PopBlocks => todo!(), } } diff --git a/binaries/cuprated/src/config.rs b/binaries/cuprated/src/config.rs index c71c40c8..0cbb0cdf 100644 --- a/binaries/cuprated/src/config.rs +++ b/binaries/cuprated/src/config.rs @@ -26,7 +26,7 @@ impl CupratedConfig { pub fn clearnet_config(&self) -> P2PConfig { P2PConfig { network: Network::Mainnet, - outbound_connections: 64, + outbound_connections: 16, extra_outbound_connections: 0, max_inbound_connections: 0, gray_peers_percent: 0.7,