nervosnetwork / ckb

The Nervos CKB is a public permissionless blockchain, and the layer 1 of Nervos network.
https://www.nervos.org
MIT License
1.15k stars 228 forks source link

Fix: verify worker exit when signal_exit is_cancelled #4612

Closed chenyukang closed 2 weeks ago

chenyukang commented 3 weeks ago

What problem does this PR solve?

When there are a lot of transaction pending in verify queue, ctrl-c may need to wait worker finishing all of them, because of this loop in verify worker, there is no chance to update self.status since worker is executing process_inner.

What is changed and how it works?

Worker should return from iteration when exit signal is sent.

Related changes

Check List

Tests

Release note

Title Only: Include only the PR title in the release note.