]> git.bitcoin.ninja Git - rust-lightning/commitdiff
[fuzz] Fix hang due to double-lock in full_stack_target
authorMatt Corallo <git@bluematt.me>
Wed, 21 Apr 2021 01:35:12 +0000 (01:35 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 31 May 2021 18:20:22 +0000 (18:20 +0000)
fuzz/src/full_stack.rs

index 0613d3a0aca965b3a47caf99068d1701bb46d69c..f85602552e3732169207bd12ff33459814d81474 100644 (file)
@@ -543,7 +543,7 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {
                                }
                        },
                        11 => {
-                               let mut txn = broadcast.txn_broadcasted.lock().unwrap();
+                               let mut txn = broadcast.txn_broadcasted.lock().unwrap().split_off(0);
                                if !txn.is_empty() {
                                        loss_detector.connect_block(&txn[..]);
                                        for _ in 2..100 {