Skip to content

Commit

Permalink
verify mgr will not pick entry when suspend
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Jan 16, 2024
1 parent a1c960b commit a008493
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion script/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,6 @@ async fn run_vms_with_signal(
let (finished_send, mut finished_recv) =
mpsc::unbounded_channel::<(Result<i8, ckb_vm::Error>, u64)>();
let (child_sender, child_recv) = watch::channel(ChunkCommand::Resume);
eprintln!("begin to run vms with signal: vms len {}", machines.len());
let jh =
tokio::spawn(
async move { run_vms_child(machines, child_recv, finished_send, context).await },
Expand Down
4 changes: 4 additions & 0 deletions tx-pool/src/verify_mgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ impl Worker {
}

async fn process_inner(&mut self) {
if self.command_rx.borrow().to_owned() == ChunkCommand::Suspend {
return;
}

if self.tasks.read().await.get_first().is_none() {
return;
}
Expand Down

0 comments on commit a008493

Please sign in to comment.