Merge #12448: Interrupt block generation on shutdown request
Summary:
0851a75 rpc: Interrupt block generation on shutdown request (João Barbosa)
Pull request description:
With this simple change, after running `bitcoin-cli -regtest generate 100000`, it is possible to interrupt `bitcoind` cleanly without waiting for the generation to complete.
Tree-SHA512: f0f7cdde242e595cfdaea31ae8bddbc25933621b63f639e813d272c2b00ce2ef52f0c14ae44954ba8c49f0fc846bcc3bfd5419e52b3347a68bb0341ce6b02d26
Backport of Core PR 12448
https://github.com/bitcoin/bitcoin/pull/12448/files
Test Plan:
make check
bitcoin-cli -regtest generate 100000
- before this change, the above would hang until completed
- after this change, the above exits when you Ctrl+C
Reviewers: deadalnix, Fabien, markblundeberg, #bitcoin_abc
Reviewed By: Fabien, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D2956