From 06cd9587ecc508525eadd29a73254c96f476a3f9 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Fri, 20 Dec 2024 09:25:50 -0300 Subject: [PATCH] fix queue tests Co-authored-by: Arya --- zebra-rpc/src/methods/tests/prop.rs | 6 ++++-- zebra-rpc/src/queue.rs | 3 --- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/zebra-rpc/src/methods/tests/prop.rs b/zebra-rpc/src/methods/tests/prop.rs index 59a16a7c3f1..8753d514c23 100644 --- a/zebra-rpc/src/methods/tests/prop.rs +++ b/zebra-rpc/src/methods/tests/prop.rs @@ -605,8 +605,10 @@ proptest! { let transaction_hash = tx.hash(); let tx_bytes = tx.zcash_serialize_to_vec()?; let tx_hex = hex::encode(&tx_bytes); - let send_task = tokio::task::spawn(async move { rpc.send_raw_transaction(tx_hex).await }); - + let send_task = { + let rpc = rpc.clone(); + tokio::task::spawn(async move { rpc.send_raw_transaction(tx_hex).await }) + }; let tx_unmined = UnminedTx::from(tx); let expected_request = mempool::Request::Queue(vec![tx_unmined.clone().into()]); diff --git a/zebra-rpc/src/queue.rs b/zebra-rpc/src/queue.rs index ae0ce7e11cb..4504cd2070f 100644 --- a/zebra-rpc/src/queue.rs +++ b/zebra-rpc/src/queue.rs @@ -180,9 +180,6 @@ impl Runner { }; self.queue.insert(tx.clone()); - if self.receiver.is_empty() { - break; - } } // skip some work if stored tip height is the same as the one arriving