-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
Call init's parameter interaction before we create the UI options model #6780
Conversation
afbb733
to
e62a033
Compare
Force pushed a copy'n'paste fix: |
Concept ACK. |
Concept ACK |
ACK |
@@ -381,7 +398,7 @@ void BitcoinApplication::startThread() | |||
if(coreThread) | |||
return; | |||
coreThread = new QThread(this); | |||
BitcoinCore *executor = new BitcoinCore(); | |||
executor = new BitcoinCore(); | |||
executor->moveToThread(coreThread); |
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.
It's not allowed to use this object [from this thread] after moving it to another thread.
I'd suggest calling InitParameterInteraction()
directly from BitcoinApplication::parameterSetup()
and not bothering with the stuff in BitcoinCore.
abc1843
to
648d812
Compare
Rebased and fixed the pointer access after |
Sorry, blocksonly mode caused a need for a small change here, as it needs to get moved. @jonasschnelli mind rebasing? What about that prune/txindex "interaction" (fails to run), should it move too? |
648d812
to
51627cc
Compare
Just rebased and moved the
My idea was to only move "rules" to the new function. Things that evaluate parameters through Pruning and TxIndex are checks that lead to a |
utACK 51627cc |
Would be nice if someone finds time to test this. Binaries: https://bitcoin.jonasschnelli.ch/pulls/6780/ |
Will do. On Saturday, November 21, 2015, Jonas Schnelli [email protected]
|
|
concept ACK / utACK |
I'd like to take this into 0.12 because it fixes a slightly security-critical issue (#6773). Some tested ACKs would be nice (another 5 days left until feature freeze). |
@jonasschnelli I am happy to test but the debug.log issue seems not yet resolved? Am I missing something? |
utACK. Agree it needs to be in 0.12 Haven't tested any specific cases - I've been holding off on this because the parameter processing is kind of fragile and I haven't properly reasoned it through yet that this doesn't have effect on the precedence of options specified in e.g. configuration files, command line, QSettings. |
Thanks @MarcoFalke for pointing out the logging issue. Added another commit that moves the logging initialization. For reviewers: The critical part are the first 100 lines in |
Sanity tests pass now:
|
utACK 296c42e |
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__); | ||
#endif | ||
} | ||
|
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.
@jonasschnelli Trivial white space rebase conflict due to 9a3e1a5. (Looks like you can ignore changes made in master)
296c42e
to
a46f87f
Compare
Thanks @MarcoFalke: rebased! |
a46f87f Initialize logging before we do parameter interaction (Jonas Schnelli) df66147 Move -blocksonly parameter interaction to the new ParameterInteraction() function (Jonas Schnelli) 68354e7 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 411b05a Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli)
Misc upstream PRs Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6077 - Second commit only (first was already applied to 0.11.X and then reverted) - bitcoin/bitcoin#6284 - bitcoin/bitcoin#6489 - bitcoin/bitcoin#6462 - bitcoin/bitcoin#6647 - bitcoin/bitcoin#6235 - bitcoin/bitcoin#6905 - bitcoin/bitcoin#6780 - Excluding second commit (QT) and third commit (requires bitcoin/bitcoin#6993) - bitcoin/bitcoin#6961 - Excluding QT parts, and a small `src/policy/policy.cpp` change which depends on a bunch of other PRs, which we'll have to remember to come back to. - bitcoin/bitcoin#7044 - bitcoin/bitcoin#8856 - bitcoin/bitcoin#9002 Part of #2074 and #2132.
Misc upstream PRs Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6077 - Second commit only (first was already applied to 0.11.X and then reverted) - bitcoin/bitcoin#6284 - bitcoin/bitcoin#6489 - bitcoin/bitcoin#6235 - bitcoin/bitcoin#6905 - bitcoin/bitcoin#6780 - Excluding second commit (QT) and third commit (requires bitcoin/bitcoin#6993) - bitcoin/bitcoin#6961 - Excluding QT parts, and a small `src/policy/policy.cpp` change which depends on a bunch of other PRs, which we'll have to remember to come back to. - bitcoin/bitcoin#7044 - bitcoin/bitcoin#8856 - bitcoin/bitcoin#9002 Part of #2074 and #2132.
…odel 9182b90 Initialize logging before we do parameter interaction (Jonas Schnelli) dec0787 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 18480ce Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli) Pull request description: Backport of bitcoin#6780 Currently optionsModel(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it before AppInit2(). ACKs for top commit: furszy: ACK 9182b90 random-zebra: ACK rebase 9182b90 and merging... Tree-SHA512: f01c9b6603452d59c3fa7df8b8f85998b9c716fd3209f80fc6d4591035c995ad577b217d1d7ffd7f642d16fe130ee922ba0394870ec391b8e972587022962611
…ing the UI model 9182b90 Initialize logging before we do parameter interaction (Jonas Schnelli) dec0787 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 18480ce Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli) Pull request description: Backport of bitcoin#6780 Currently optionsModel(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it before AppInit2(). ACKs for top commit: furszy: ACK 9182b90 random-zebra: ACK rebase 9182b90 and merging... Tree-SHA512: f01c9b6603452d59c3fa7df8b8f85998b9c716fd3209f80fc6d4591035c995ad577b217d1d7ffd7f642d16fe130ee922ba0394870ec391b8e972587022962611
…ing the UI model 9182b90 Initialize logging before we do parameter interaction (Jonas Schnelli) dec0787 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 18480ce Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli) Pull request description: Backport of bitcoin#6780 Currently optionsModel(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it before AppInit2(). ACKs for top commit: furszy: ACK 9182b90 random-zebra: ACK rebase 9182b90 and merging... Tree-SHA512: f01c9b6603452d59c3fa7df8b8f85998b9c716fd3209f80fc6d4591035c995ad577b217d1d7ffd7f642d16fe130ee922ba0394870ec391b8e972587022962611
…ing the UI model 9182b90 Initialize logging before we do parameter interaction (Jonas Schnelli) dec0787 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 18480ce Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli) Pull request description: Backport of bitcoin#6780 Currently optionsModel(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it before AppInit2(). ACKs for top commit: furszy: ACK 9182b90 random-zebra: ACK rebase 9182b90 and merging... Tree-SHA512: f01c9b6603452d59c3fa7df8b8f85998b9c716fd3209f80fc6d4591035c995ad577b217d1d7ffd7f642d16fe130ee922ba0394870ec391b8e972587022962611
…ing the UI model 9182b90 Initialize logging before we do parameter interaction (Jonas Schnelli) dec0787 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 18480ce Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli) Pull request description: Backport of bitcoin#6780 Currently optionsModel(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it before AppInit2(). ACKs for top commit: furszy: ACK 9182b90 random-zebra: ACK rebase 9182b90 and merging... Tree-SHA512: f01c9b6603452d59c3fa7df8b8f85998b9c716fd3209f80fc6d4591035c995ad577b217d1d7ffd7f642d16fe130ee922ba0394870ec391b8e972587022962611
…ing the UI model 9182b90 Initialize logging before we do parameter interaction (Jonas Schnelli) dec0787 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 18480ce Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli) Pull request description: Backport of bitcoin#6780 Currently optionsModel(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it before AppInit2(). ACKs for top commit: furszy: ACK 9182b90 random-zebra: ACK rebase 9182b90 and merging... Tree-SHA512: f01c9b6603452d59c3fa7df8b8f85998b9c716fd3209f80fc6d4591035c995ad577b217d1d7ffd7f642d16fe130ee922ba0394870ec391b8e972587022962611
…odel 9182b9007559fa6ae945b1e13984dc1971572c28 Initialize logging before we do parameter interaction (Jonas Schnelli) dec078739aca63be8dc7c6e2fbb8267c2dfa86c3 [QT] Call inits parameter interaction before we create the options model (Jonas Schnelli) 18480ce73994d9326b27a0ff7a034e71ec5f0dce Refactor parameter interaction, call it before AppInit2() (Jonas Schnelli) Pull request description: Backport of bitcoin/bitcoin#6780 Currently optionsModel(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it before AppInit2(). ACKs for top commit: furszy: ACK 9182b90 random-zebra: ACK rebase 9182b9007559fa6ae945b1e13984dc1971572c28 and merging... Tree-SHA512: f01c9b6603452d59c3fa7df8b8f85998b9c716fd3209f80fc6d4591035c995ad577b217d1d7ffd7f642d16fe130ee922ba0394870ec391b8e972587022962611 # Conflicts: # src/init.cpp
Add -blocksonly option Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6993 - bitcoin/bitcoin#7046 - bitcoin/bitcoin#6780 - The third commit (we backported the rest in #2390). - bitcoin/bitcoin#7126 - bitcoin/bitcoin#7439 - bitcoin/bitcoin#15990 - Only the `-blocksonly` documentation changes. - bitcoin/bitcoin#16555 - bitcoin/bitcoin#18391 - Only the `-blocksonly` documentation changes. Part of #2074.
Currently
optionsModel
(QT) parameters interaction overwrites/dominates initial and depending parameter settings. This PR would factor out init's parameter interaction and call it beforeAppInit2()
.Fixes #6773