Ported from https://github.com/bitcoin/bitcoin/pull/17659.
On master (b4d0366b47dd9b8fe29cc9a100dcdf6ca1d3cabf) the GUI thread is blocked with QThread::wait() during bitcoin-qt shutdown routine. This causes unresponsive GUI if some commands are passed to the RPC console (#53) before shutdown initiating.
This PR:
- removes blocking call and uses additional signal-to-slot connections.
- makes
bitcoin-qtshutdown routine more streamlined: the onlyQApplication::exec()is used inbitcoin-qt. Therefore, the main event loop never interrupts until shutdown.
Fix #53