-
Notifications
You must be signed in to change notification settings - Fork 38.7k
gui: Do not create payment server if -disablewallet option provided #16436
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
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concept ACK, makes sense to not instantiate these objects when -disablewallet.
It would be nice to remove all ENABLE_WALLET and other similar checks from src/qt/bitcoin.cpp.
nit, commit could also have prefix.
src/qt/bitcoin.cpp
Outdated
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.
This is not necessary, it is safe to delete nullptr.
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.
Or maybe you want to get rid of these delete as these objects are owned by BitcoinApplication instance.
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.
Or maybe you want to get rid of these
deleteas these objects are owned byBitcoinApplicationinstance.
Exactly!
src/qt/bitcoin.cpp
Outdated
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.
This could be assert(paymentServer)?
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.
Failing to create a PaymentServer object is not critical, IMO.
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.
Also new will never return a nullptr anyway.
20ef0d5 to
4057b7a
Compare
|
@promag Thank you for your review. Your comments have been addressed.
Could you elaborate your suggestion? |
|
Concept ACK |
|
utACK 4057b7a |
|
ACK 4057b7a |
…ion provided 4057b7a wallet: Recognize -disablewallet option early (Hennadii Stepanov) Pull request description: This PR makes early check for the `-disablewallet` option. If `-disablewallet=1`, objects `PaymentServer` and `WalletController` are nor created. ACKs for top commit: jonasschnelli: utACK 4057b7a laanwj: ACK 4057b7a Tree-SHA512: 74633cd1eacd0914c73712e6dff190255b5378595cfee7eaeb91e17671fc9120928034739f4ae1c53b86f46c4b400390877241384376b2fc534de326d3ab0944
Summary: PR description: > This PR makes early check for the -disablewallet option. > If `-disablewallet=1`, objects PaymentServer and WalletController are nor created. Backport of Core [[bitcoin/bitcoin#16436 | PR16436]] Test Plan: `ninja && ninja check` `src/qt/bitcoin-qt -disablewallet` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, deadalnix Subscribers: deadalnix Differential Revision: https://reviews.bitcoinabc.org/D7889
This PR makes early check for the
-disablewalletoption.If
-disablewallet=1, objectsPaymentServerandWalletControllerare nor created.