-
Notifications
You must be signed in to change notification settings - Fork 38.8k
gui: Enable console line edit on setClientModel #16122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
It's not possible to run RPC commands (not even by bitcoin-cli) if the initial rescan hasn't completed. A long term alternative is to move this rescan after the initialization? /cc @ryanofsky |
Since the rescan loop doesn't hold onto cs_main anymore, I'd expect that RPC commands could work during a rescan, and don't understand exactly what problem causes this crash, and what problem causes bitcoin-cli not to work right now. Longer term, I think the main thing that needs to happen is for the rescan loop to move out of the wallet into the node ( In terms of implementation I would build this on top of #15719 by adding a |
Because the server gives src/bitcoin-cli -regtest help
error code: -28
error message:
Rescanning...
Because
This would go away right? bitcoin/src/walletinitinterface.h Lines 22 to 23 in c7cfd20
|
ryanofsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 727143b65cdb801a0b755cb8b3aff97da5fe8f27
Thanks for the explanations.
This would go away right?
I think adding a CBlockLocator argument to handleNotifications (sorry I mistakenly wrote requestNotifications before) should be the only init interface change needed for simultaneous rescanning.
The WalletInitInterface::Construct call shouldn't be affected and isn't directly involved in loading wallets. The Construct method is only responsible for parsing -wallet and -disablewallet options and constructing WalletClientImpl objects. Wallet loading happens later when WalletClientImpl::load is called.
727143b to
2d8ad2f
Compare
|
tACK 2d8ad2f on macOS. Using master (c7cfd20) it's possible to cause a crash during startup by opening lldb Bitcoin-Qt.app
(lldb) target create "Bitcoin-Qt.app"
Current executable set to 'Bitcoin-Qt.app' (x86_64).
(lldb) run
Process 59937 launched: '/Users/michael/github/bitcoin/Bitcoin-Qt.app/Contents/MacOS/Bitcoin-Qt' (x86_64)
2019-05-31 09:53:29.580881-0400 Bitcoin-Qt[59937:3647765] MessageTracer: Falling back to default whitelist
Process 59937 stopped
* thread #1, name = 'bitcoin-main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x8)
frame #0: 0x00000001011a78ba QtWidgets`QCompleter::popup() const + 10
QtWidgets`QCompleter::popup:
-> 0x1011a78ba <+10>: movq 0x8(%rdi), %rbx
0x1011a78be <+14>: movq 0x88(%rbx), %rax
0x1011a78c5 <+21>: testq %rax, %rax
0x1011a78c8 <+24>: jne 0x1011a7942 ; <+146>
Target 0: (Bitcoin-Qt) stopped.Using this PR (2d8ad2f), it's still possible to get to the console during startup, but it's impossible to enter or execute any commands. The console is enabled when startup completes. |
2d8ad2f gui: Enable console line edit on setClientModel (João Barbosa) Pull request description: Make console line edit disable by default, and only enable once `RPCConsole::setClientModel` is called. Fixes #16119. ACKs for commit 2d8ad2: fanquake: tACK 2d8ad2f on macOS. Tree-SHA512: 1418ce3c120c08e5ec3e7a7a063572a24402ce0ec541bd4adc21f61d60c4e86b711e82e940ebf5f0445ab861f89c146c2a2e7990fb52bed2c65fc199a1981f71
Github-Pull: bitcoin#16122 Rebased-From: 2d8ad2f
Github-Pull: bitcoin#16122 Rebased-From: 2d8ad2f
Github-Pull: bitcoin#16122 Rebased-From: 2d8ad2f
Summary: It was possible to cause bitcoin-qt to crash by executing any command in menu `Window` > `Console` during startup. This is fixed by disabling console line edit by default, and only enabling once `RPCConsole::setClientModel` is called. Backport of Core [[bitcoin/bitcoin#16122 | PR16122]] Test Plan: `ninja && ninja check` Note: I wasn't able to reproduce the crash, I'm not able to reach the menu before the application is well started. But I tested that the console is still usable after this diff. Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7803
2d8ad2f gui: Enable console line edit on setClientModel (João Barbosa) Pull request description: Make console line edit disable by default, and only enable once `RPCConsole::setClientModel` is called. Fixes bitcoin#16119. ACKs for commit 2d8ad2: fanquake: tACK bitcoin@2d8ad2f on macOS. Tree-SHA512: 1418ce3c120c08e5ec3e7a7a063572a24402ce0ec541bd4adc21f61d60c4e86b711e82e940ebf5f0445ab861f89c146c2a2e7990fb52bed2c65fc199a1981f71
2d8ad2f gui: Enable console line edit on setClientModel (João Barbosa) Pull request description: Make console line edit disable by default, and only enable once `RPCConsole::setClientModel` is called. Fixes bitcoin#16119. ACKs for commit 2d8ad2: fanquake: tACK bitcoin@2d8ad2f on macOS. Tree-SHA512: 1418ce3c120c08e5ec3e7a7a063572a24402ce0ec541bd4adc21f61d60c4e86b711e82e940ebf5f0445ab861f89c146c2a2e7990fb52bed2c65fc199a1981f71
Make console line edit disable by default, and only enable once
RPCConsole::setClientModelis called.Fixes #16119.