gui: Do not create payment server if -disablewallet option provided#16436
gui: Do not create payment server if -disablewallet option provided#16436laanwj merged 1 commit intobitcoin:masterfrom
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.
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.
This is not necessary, it is safe to delete nullptr.
There was a problem hiding this comment.
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.
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.
This could be assert(paymentServer)?
There was a problem hiding this comment.
Failing to create a PaymentServer object is not critical, IMO.
There was a problem hiding this comment.
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.