forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
init: Fix crash due to -litemode and improve its deprecation warning #3626
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ignal Prior to this commit the signal `CClientUIInterface::ThreadSafeMessageBox` is not connected to a slot in Qt at the time its emitted when `-litemode` is used. The signal gets emitted from `InitWarning`, in `InitParameterInteraction`. This happens currently before `BitcoinGUI` gets created by `app.createWindow(networkStyle.data())` in `dash.cpp` where the signal becomes connected to the slot. After this commit the litemode `InitWarning` will be called in `AppInitParameterInteraction` which runs after `BitcoinGUI` has been created, means the signal will be connected then at that point and the crash is fixed.
- Always show a basic warning if `-litemode` gets used no matter if its activated or not. - Let the user know when -disablegovernance gets forced by -litemode.
UdjinM6
approved these changes
Jul 24, 2020
UdjinM6
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.
Good catch 👍
utACK
PastaPastaPasta
approved these changes
Jul 27, 2020
Member
PastaPastaPasta
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
PastaPastaPasta
pushed a commit
to PastaPastaPasta/dash
that referenced
this pull request
Aug 23, 2020
…ashpay#3626) * init: Fix `-litemode` crash due to not connected CClientUIInterface signal Prior to this commit the signal `CClientUIInterface::ThreadSafeMessageBox` is not connected to a slot in Qt at the time its emitted when `-litemode` is used. The signal gets emitted from `InitWarning`, in `InitParameterInteraction`. This happens currently before `BitcoinGUI` gets created by `app.createWindow(networkStyle.data())` in `dash.cpp` where the signal becomes connected to the slot. After this commit the litemode `InitWarning` will be called in `AppInitParameterInteraction` which runs after `BitcoinGUI` has been created, means the signal will be connected then at that point and the crash is fixed. * init: Improve -litemode deprecation warning - Always show a basic warning if `-litemode` gets used no matter if its activated or not. - Let the user know when -disablegovernance gets forced by -litemode.
Member
|
backported in #3670 |
gades
pushed a commit
to cosanta/cosanta-core
that referenced
this pull request
Apr 1, 2022
…ashpay#3626) * init: Fix `-litemode` crash due to not connected CClientUIInterface signal Prior to this commit the signal `CClientUIInterface::ThreadSafeMessageBox` is not connected to a slot in Qt at the time its emitted when `-litemode` is used. The signal gets emitted from `InitWarning`, in `InitParameterInteraction`. This happens currently before `BitcoinGUI` gets created by `app.createWindow(networkStyle.data())` in `dash.cpp` where the signal becomes connected to the slot. After this commit the litemode `InitWarning` will be called in `AppInitParameterInteraction` which runs after `BitcoinGUI` has been created, means the signal will be connected then at that point and the crash is fixed. * init: Improve -litemode deprecation warning - Always show a basic warning if `-litemode` gets used no matter if its activated or not. - Let the user know when -disablegovernance gets forced by -litemode.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prior to this PR the signal
CClientUIInterface::ThreadSafeMessageBoxis not connected to a slot in Qt at the time its emitted when-litemodeis used. The signal gets emitted fromInitWarning, inInitParameterInteraction. This happens currently beforeBitcoinGUIgets created byapp.createWindow(networkStyle.data())indash.cppwhere the signal becomes connected to the slot. After this commit the litemodeInitWarningwill be called inAppInitParameterInteractionwhich runs afterBitcoinGUIhas been created, means the signal will be connected then at that point and the crash introduced in #3579 is fixed.This also brings some changes to the deprecation warning message if
-litemodeis still used.-litemodegets used no matter if itsactivated or not.
-disablegovernancegets forced by-litemode.