rpc: Fix gui shutdown when waitfor* cmds are called from RPC console - #18452
Conversation
|
While the Travis-to-GitHub connection is broken, here is Travis' build of this PR. |
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsNo conflicts as of last run. |
promag
left a comment
There was a problem hiding this comment.
Concept ACK. Have you considered doing this in BitcoinApplication::requestShutdown or even between app.exec() and app.requestShutdown() in qt/bitcoin.cpp?
Yes, I have. Line 316 in 5f9cd62 What are benefits of such approach while it requires to add Also, please note, that #17659 suggests to streamline the |
|
Concept ACK |
29f5e02 to
368530d
Compare
|
Updated 29f5e02 -> 368530d (pr18452.01 -> pr18452.02, diff):
|
368530d to
59b55cc
Compare
|
Updated 368530d -> 59b55cc (pr18452.02 -> pr18452.03, diff):
|
|
Tested ACK 59b55cc. |
| if (g_rpc_stopped) return; | ||
| LogPrint(BCLog::RPC, "Stopping RPC\n"); | ||
| deadlineTimers.clear(); | ||
| DeleteAuthCookie(); | ||
| g_rpc_stopped = true; |
59b55cc to
2d7b6bc
Compare
|
Updated 59b55cc -> 2d7b6bc (pr18452.03 -> pr18452.04, diff):
|
|
Rebased 2d7b6bc -> da73f15 (pr18452.04 -> pr18452.05) due to the conflict with #18814. |
|
utACK da73f15 |
Github-Pull: bitcoin#18452 Rebased-From: da73f15
Summary: This is a backport of [[bitcoin/bitcoin#18452 | core#18452]] Test Plan: `bitcoin-qt -server=1` In the RPC console, type `waitforblockheight XXXXXX` with XXXXXXX a future block height, then close the application. Make sure it does not hang. Reviewers: #bitcoin_abc, majcosta Reviewed By: #bitcoin_abc, majcosta Differential Revision: https://reviews.bitcoinabc.org/D9260
On master (7eed413), if the GUI has been started with
-server=1,bitcoin-qthangs on shutdown during calling any of thewaitfor*commands in the GUI RPC console.This PR suggests minimal changes to fix this bug.
Fix #17495