aboutsummaryrefslogtreecommitdiff
path: root/src/qt
AgeCommit message (Collapse)Author
2022-04-16qt: Revamp ClientModel code to handle BannedListChanged core signalHennadii Stepanov
No behavior change.
2022-04-16qt: Revamp ClientModel code to handle AlertChanged core signalHennadii Stepanov
No behavior change.
2022-04-15Merge bitcoin-core/gui#579: Getting ready to Qt 6 (2/n). Remove ↵Hennadii Stepanov
`QApplication::globalStrut()` 3eaf5dbfe0a0c814116e92f602f3c062259b6ea3 qt: Remove `QApplication::globalStrut()` call (Hennadii Stepanov) Pull request description: This function has been deprecated in Qt 5.15.0, and has been [removed](https://github.com/qt/qtbase/commit/033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b) in Qt 6. ACKs for top commit: jarolrod: ACK 3eaf5dbfe0a0c814116e92f602f3c062259b6ea3 luke-jr: utACK 3eaf5dbfe0a0c814116e92f602f3c062259b6ea3 Tree-SHA512: 71ee539b6ffa3755f7e6beaa72a8937886471e298830878def6dd9f48c601611d94d52c638bc1602f938df2ba84ff8b130ea8da8e6c08ae7146173fa613a5003
2022-04-15Merge bitcoin-core/gui#556: refactor: Make BitcoinUnits::Unit a scoped enumHennadii Stepanov
0e5dedbc9eb54105ab9b0c4ce1f57afa55bcb5b6 qt/wallettests: sort includes (William Casarin) 0554251d660caa1c3f5f44ae1d9fa3c23d2aac18 qt: Skip displayUnitChanged signal if unit is not actually changed (Hennadii Stepanov) ffbc2fe459034024cb2fce9fd94bff457b7a7d49 qt, refactor: Remove default cases for scoped enum (Hennadii Stepanov) 152d5bad50f145af922011f6ec1fd9afd9076ceb qt, refactor: Remove BitcoinUnits::valid function (Hennadii Stepanov) aa23960fdf1deff321ecea435026c87db78498fb qt, refactor: Make BitcoinUnits::Unit a scoped enum (Hennadii Stepanov) 75832fdc37ea3fe9cf515bd1946e220fe07a440b qt: Use QVariant instead of int for BitcoinUnit in QSettings (Hennadii Stepanov) Pull request description: This is a rebased version of #60 Since Qt 5.5 there are [means](https://doc.qt.io/qt-5/qobject.html#Q_ENUM) to register an enum type with the meta-object system (such enum still lacks an ability to interact with [QSettings::setValue()](https://doc.qt.io/qt-5/qsettings.html#setValue) and [QSettings::value()](https://doc.qt.io/qt-5/qsettings.html#value) without defined stream operators). In order to reduce global namespace polluting and to force strong type checking, this PR makes BitcoinUnits::Unit a scoped enum (typedef BitcoinUnits::Unit BitcoinUnit;). No behavior change. ACKs for top commit: jonatack: ACK 0e5dedbc9eb54105ab9b0c4ce1f57afa55bcb5b6, review and debug build of each commit after rebase on current master, lightly tested running the GUI, changing units a few times, and verifying persistence after restarting promag: Code review ACK 0e5dedbc9eb54105ab9b0c4ce1f57afa55bcb5b6 Tree-SHA512: 39ec0d7e4f0b9b25be287888121a8db6b282339674e37ec3a3554da63a9e22d6fe079e8310ca289b2a0356a19b3c7e55afa17d09dd34e0f222177f603bb053a3
2022-04-15Merge bitcoin-core/gui#552: Refactor `TransactionDesc::FormatTxStatus` and ` ↵Hennadii Stepanov
TransactionStatus` 343f83d0886ae39c9dacb29762ce712711b2bad2 qt, refactor: Use member initializers in TransactionStatus (w0xlt) 66d58ad7a99a98b5e78fd97ddf777ea00e6091cf qt, refactor: remove unused field `qint64 TransactionStatus::open_for` (w0xlt) ad6adedb46e25870bcdabeca93c51c3ac2a33de7 qt, refactor: remove unused parameters in `TransactionDesc::FormatTxStatus()` (w0xlt) 045f8d0310d2340aa32db6f7e582dea45950d28a scripted-diff: rename nDepth -> depth (w0xlt) b1bc1431db1e86eefaf4a91e08663628d94656fc qt, refactor: remove redundant scope in `TransactionDesc::FormatTxStatus()` (w0xlt) Pull request description: This PR implements the changes suggested in https://github.com/bitcoin-core/gui/issues/538#issuecomment-1021913294 . . remove redundant scope, rename `nDepth` -> `depth`, remove unused parameters and add translator comments in `TransactionDesc::FormatTxStatus()` . Use member initializers and remove unused field `qint64 TransactionStatus::open_for` in `TransactionStatus`. Closes https://github.com/bitcoin-core/gui/issues/538 ACKs for top commit: hebasto: ACK 343f83d0886ae39c9dacb29762ce712711b2bad2, I have reviewed the code and it looks OK, I agree it can be merged. jarolrod: Code Review ACK https://github.com/bitcoin-core/gui/commit/343f83d0886ae39c9dacb29762ce712711b2bad2 Tree-SHA512: cc7333d85b7eb731aa8cdd2d8dfc707341532c93e1b5e3858e8341446cf055ba055b601f9662e8d4602726b1bedf13149c46256a60a0ce1a562f94c9986d945a
2022-04-13qt: Do not use `QKeyEvent` copy constructorHennadii Stepanov
This change is preparation for Qt 6, and it fixes an experimental build with Qt 6.2.4 as copying of `QEvent` has been disabled in Qt 6.0.0 (see 19f9b0d5f54379151eb71e98555b203ad6756276 upstream commit).
2022-04-13qt: Do not assume `qDBusRegisterMetaType` return typeHennadii Stepanov
`qDBusRegisterMetaType` returns: - `int` in Qt 5 - `QMetaType` in Qt 6
2022-04-13qt, refactor: Use member initializers in TransactionStatusw0xlt
2022-04-13qt, refactor: remove unused field `qint64 TransactionStatus::open_for`w0xlt
2022-04-13Merge bitcoin-core/gui#577: Getting ready to Qt 6 (1/n)Hennadii Stepanov
63125752a902de725f8aad1ee5bdaf5cb0c70f91 qt: Update deprecated enum value (Hennadii Stepanov) c7add881a674d927e58f11dac0dca223c7322cb9 qt: Use `|` instead of `+` for key modifiers (Hennadii Stepanov) 6f1e162fe135d051d16859be57ef44d191e095cc qt: Fix headers (Hennadii Stepanov) Pull request description: For Qt 5 all changes in this PR are refactoring. But for [Qt 6](https://github.com/bitcoin/bitcoin/pull/24798) they are real bugfixes :) As I do not provide anyway way to build `bitcoin-qt` against Qt 6.2.4 fir now, suggesting to reviewers to verify changes for Qt 5 only. ACKs for top commit: shaavan: ACK 63125752a902de725f8aad1ee5bdaf5cb0c70f91 jarolrod: tACK https://github.com/bitcoin-core/gui/commit/63125752a902de725f8aad1ee5bdaf5cb0c70f91 Tree-SHA512: ceee983192ddf62f09c1305458af3447ff0e3bd90311fa6328b139673bcaed3407dc0ce0b275028d4e0ca251d6b54dad40b48049211aeb251f65cbb4f5330834
2022-04-13Merge bitcoin-core/gui#576: Add qt unit test runner summaryHennadii Stepanov
d025d7f0251e26b7ab5cf48c236b6b5e46fafe26 gui, refactor: rename fInvalid to num_test_failures in test_main.cpp (Jon Atack) 2489b6fe9cd1b669362d459e93185ca0bd9f8714 gui: count test failures in test runner summary (Jon Atack) ba44aae7683f412626baa8bf51708ddf25f51ba8 gui: add test runner summary (Jon Atack) Pull request description: Append a one-line summary to the output of running `./src/qt/test/test_bitcoin-qt` indicating that all tests passed or showing the number of failing tests. It's currently a bit inconvenient to see this result by eyeballing all of the output. ACKs for top commit: shaavan: ACK d025d7f0251e26b7ab5cf48c236b6b5e46fafe26 jarolrod: tACK https://github.com/bitcoin-core/gui/commit/d025d7f0251e26b7ab5cf48c236b6b5e46fafe26 Tree-SHA512: 981c5daa13db127d38167bcf78b296b1a7e5b2d12e65f364ec6382b24f1008a223521d3b6c56e920bcd037479da5414e43758794688019d09e9aa696f3964746
2022-04-13Merge bitcoin-core/gui#543: peers-tab: add connection duration column to ↵Hennadii Stepanov
tableview 51708c4516cb9d52e84dc8850d93f556dda1a75b gui: peersWidget - ResizeToContents Age and IP/Netmask columns (randymcmillan) 209301a442512579d57f79c82417dc7c496248b6 gui: add Age column to peers tab (randymcmillan) 127de22c5fb396e1670d2a911faf7a9adc9241e2 gui: add FormatPeerAge() utility helper (Jon Atack) Pull request description: This change adds an "Age" column to the peers table view, which displays the duration of each peer's connection. ACKs for top commit: jonatack: re-ACK 51708c4516cb9d52e84dc8850d93f556dda1a75b Jamewood: > re-ACK 51708c4 shaavan: reACK 51708c4516cb9d52e84dc8850d93f556dda1a75b hebasto: ACK 51708c4516cb9d52e84dc8850d93f556dda1a75b, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 27323f7080ec0d3fcdbf1b190fba1cd2d7406840ab6607c221cf8af950db9134e22721cc5a88f4fc4f390d8b05e98bc4b7521661a31fadad9e2c6c6390e71788
2022-04-10qt: Revamp ClientModel code to handle NetworkActiveChanged core signalHennadii Stepanov
No behavior change.
2022-04-10qt: Revamp ClientModel code to handle NumConnectionsChanged core signalHennadii Stepanov
No behavior change.
2022-04-10qt: Revamp ClientModel code to handle ShowProgress core signalHennadii Stepanov
No behavior change.
2022-04-09qt: Remove `QApplication::globalStrut()` callHennadii Stepanov
This function has been deprecated in Qt 5.15.0, and has been removed in Qt 6 (see 033d01bd6e2aef740ad1408a04d3ca0ae3b9ba9b upstream commit).
2022-04-09qt: Update deprecated enum valueHennadii Stepanov
This change is preparation for Qt 6, and it fixes an experimental build with Qt 6.2.4. The `Qt::ItemIsTristate` value has been deprecated since 5.6.0 (see ae8406d82f541f6d9112bdac192e5e4e114d56aa upstream commit).
2022-04-09qt: Use `|` instead of `+` for key modifiersHennadii Stepanov
This change is preparation for Qt 6 where `+` has been deprecated, and it fixes an experimental build with Qt 6.2.4.
2022-04-09qt: Fix headersHennadii Stepanov
This change is preparation for Qt 6, and it fixes an experimental build with Qt 6.2.4.
2022-04-06gui, refactor: rename fInvalid to num_test_failures in test_main.cppJon Atack
2022-04-06gui: count test failures in test runner summaryJon Atack
2022-04-06gui: add test runner summaryJon Atack
2022-04-06lint: remove qt SIGNAL/SLOT lintfanquake
I think we are past the point where we need to lint for this, the CPU can probably be better utilized.
2022-04-06doc: Convert remaining comments to clang-tidy formatMarcoFalke
2022-04-04Merge bitcoin-core/gui#569: test: add regression test for #567Hennadii Stepanov
4d4dca43fc591bf8fae7af74670f6e96650ef34b test: add regression test for bitcoin-core/gui/issues/567 (Vasil Dimov) 3b82608dd11d35fa393ee0501c206d74c748248a options: add a comment for -listenonion and dedup a long expression (Vasil Dimov) Pull request description: Add a test that would fail, should https://github.com/bitcoin-core/gui/issues/567 resurface. Also, add a comment and dedup a long expression. ACKs for top commit: jarolrod: reACK 4d4dca43fc jonatack: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b hebasto: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b, tested with reverting changes from bitcoin-core/gui#568, and getting an expected test failure. shaavan: ACK 4d4dca43fc591bf8fae7af74670f6e96650ef34b Tree-SHA512: 59f069bdaa84586bb599e9372f89e4e66a3cafcbf58677fdf913d685c17dfa9c3d5b118829d81021a9a33b4fd8e46d4c7eb68c1dd902cf1c44a41b8e66e2967b
2022-04-04refactor: fix clang-tidy named args usagefanquake
2022-04-03Merge bitcoin-core/gui#557: Revert "qt: Do not use QObject::tr plural syntax ↵Hennadii Stepanov
for numbers with a unit symbol" 0c64401324b03f5576149bf27138cdb103dae934 Revert "qt: Do not use QObject::tr plural syntax for numbers with a unit symbol" (Luke Dashjr) Pull request description: Apparently this got forgotten. Maybe too late for 23.x (it's a bugfix, but changes translation strings). This reverts commit 3adde72bc99215062c8dabd38f8c34ad093452b5 (#296) per [GChuf](https://github.com/bitcoin-core/gui/pull/296#issuecomment-962516055) >I can confirm for slovenian and other slavic languages that we do have 3 or 4 different ways of saying "%n GB needed%, depending on the actual number of gigabytes. Similar to english "is/are". There's no way to cover all cases ... this is exactly why transifex allows you to have more than 2 options. ACKs for top commit: hebasto: ACK 0c64401324b03f5576149bf27138cdb103dae934, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: c01bae44a32b3ec324f2f9b8e4923bbb2e83bbd1460b745c5c911b98a9b2806fcbf815cfb19a1f1a7038c5c14312e102e7df8744c9002ef784b36d158e08eb14
2022-04-01test: add regression test for bitcoin-core/gui/issues/567Vasil Dimov
2022-03-31options: add a comment for -listenonion and dedup a long expressionVasil Dimov
A followup to https://github.com/bitcoin-core/gui/pull/568 Co-authored-by: Jon Atack <jon@atack.com>
2022-03-25Merge bitcoin/bitcoin#24494: wallet: generate random change target for each ↵fanquake
tx for better privacy 9053f64fcbd26d87c26ae6b982d17756a6ea0896 [doc] release notes for random change target (glozow) 46f2fed6c5e0fa623bfeabf61ba4811d5cf8f47c [wallet] remove MIN_CHANGE (glozow) a44236addd01cff4e4d751e0f379d399fbfc8eae [wallet] randomly generate change targets (glozow) 1e52e6bd0a8888efb4ed247d74ec7ca9dfc2e002 refactor coin selection for parameterizable change target (glozow) Pull request description: Closes #24458 - the wallet always chooses 1 million sats as its change target, making it easier to fingerprint transactions created by the Core wallet. Instead of using a fixed value, choose one randomly each time (within a range). Using 50ksat (around $20) as the lower bound and `min(1 million sat, 2 * average payment value)` as the upper bound. RFC: If the payment is <25ksat, this doesn't work, so we're using the range (payment amount, 50ksat) instead. ACKs for top commit: achow101: ACK 9053f64fcbd26d87c26ae6b982d17756a6ea0896 Xekyo: reACK 9053f64fcbd26d87c26ae6b982d17756a6ea0896 Tree-SHA512: 45ce5d064697065549473347648e29935733f3deffc71a6ab995449431f60302d1f9911a0994dfdb960b48c48b5d8859f168b396ff2a62db67d535a7db041d35
2022-03-25Merge bitcoin/bitcoin#24666: refactor: Fix coinselection.h include, Make ↵fanquake
COutput a struct fab287cedde85b21622d767d3ece65291e18b0bf Clarify that COutput is a struct, not a class (MarcoFalke) fa61cdf464381dddd9da076b1a1cab95ff5b3baf wallet: Fix coinselection include (MarcoFalke) Pull request description: * Fix include (see commit message) * `{}`-init, see https://github.com/bitcoin/bitcoin/pull/24091#discussion_r831193284 * `struct`, see https://github.com/bitcoin/bitcoin/pull/24091#discussion_r831192702 ACKs for top commit: theStack: Code-review ACK fab287cedde85b21622d767d3ece65291e18b0bf Tree-SHA512: dd2cfb9c06a92295dbd8fbb6d56afcf00ebda2a0440e301d392cd183d1b9cd87626311d539e302a9e6c6521d69d6183c74a51934e3fc16e64a5dcaba60c7e3ce
2022-03-25Merge bitcoin/bitcoin#21160: net/net processing: Move tx inventory into ↵fanquake
net_processing 1066d10f71e6800c78012d789ff6ae19df0243fe scripted-diff: rename TxRelay members (John Newbery) 575bbd0dea6d12510fdf3220d0f0e47d969da6e9 [net processing] Move tx relay data to Peer (John Newbery) 785f55f7eeab0dedbeb8e0d0b459f3bdc538b621 [net processing] Move m_wtxid_relay to Peer (John Newbery) 36346703f8558d6781c079c29ddece5a97477beb [net] Add CNode.m_relays_txs and CNode.m_bloom_filter_loaded (John Newbery) Pull request description: This continues the work of moving application layer data into net_processing, by moving all tx data into the new Peer object added in #19607. For motivation, see #19398. ACKs for top commit: dergoegge: ACK 1066d10f71e6800c78012d789ff6ae19df0243fe - This is a good layer separation improvement with no behavior changes. glozow: utACK 1066d10f71e6800c78012d789ff6ae19df0243fe Tree-SHA512: 0c9d6b8a0a05e2d816b6d6588b7df133842ec960ae67667813422aa7bd8eb5308599c714f3822a98ddbdf364ffab9050b055079277ba4aff24092557ff99ebcc
2022-03-25[wallet] remove MIN_CHANGEglozow
2022-03-25wallet: Fix coinselection includeMarcoFalke
coinselection.h is not used by wallet.h but by qt/coincontroldialog.cpp
2022-03-23options: flip listenonion to false if not listeningVasil Dimov
If the user has unchecked "Allow incoming connections" in `Settings->Options...->Network` then `fListen=false` is saved in `~/.config/Bitcoin/Bitcoin-Qt.conf`. This flips `-listen` to `false` during startup, but leaves `-listenonion` to `true`. This flipping of `-listen` is done in `OptionsModel::Init()` after `InitParameterInteraction()` has been executed which would have flipped `-listenonion`, should it have seen `-listen` being `false` (this is a difference between `bitcoind` and `bitcoin-qt`). Fixes: https://github.com/bitcoin-core/gui/issues/567
2022-03-22qt: Avoid potential -Wdeprecated-enum-enum-conversion warningHennadii Stepanov
2022-03-22qt: Use human-readable strings in preference to hard-coded integersHennadii Stepanov
This is recommended by Qt docs. See: https://doc.qt.io/qt-5/qkeysequence.html#details Also this change avoids -Wdeprecated-enum-enum-conversion warnings.
2022-03-20Merge bitcoin-core/gui#554: Add and improve translator comments and tooltips ↵Hennadii Stepanov
for peers tab address fields 4d2b503d6cbb593cf75cf053fd480de64b3f4fc0 gui: improve "Addresses Rate-Limited" translator comments and tooltip in peers tab (Jon Atack) 81ef1f7ef182050efaed7ab40b1b159a8ada3739 gui: improve "Addresses Processed" translator comments and tooltip in peers tab (Jon Atack) 77f24aac52288532f2a818e49482b0d4761dff27 gui: improve "Address Relay" translator comments and tooltip in peers tab (Jon Atack) Pull request description: Per translator feedback in this thread: https://github.com/bitcoin-core/gui/pull/526#discussion_r809237830 *"The lack of string context in Transifex is a real problem for this project, as proper context (dev notes and/or screenshots) are essential to achieve quality translations."* This pull adds developer notes for transifex translators via `extracomment` tags, and it improves the existing ones and their tooltips with more context, clarity and completeness for the following peer tab fields as a follow-up to bitcoin-core/gui#526: - address relay - addresses processed - addressed rate-limited It looks like only six lines of diff, but they are loooong lines. If this is the right direction, the same can be done for other fields in follow-ups. ACKs for top commit: jarolrod: re-ACK [4d2b503](https://github.com/bitcoin-core/gui/commit/4d2b503d6cbb593cf75cf053fd480de64b3f4fc0) hebasto: ACK 4d2b503d6cbb593cf75cf053fd480de64b3f4fc0, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: a185f46a66375a5fd6854640745b7d1d00740cf7be58db03256f44d71acc351e1770de137cb3bc9c1f0ea3cabd7cfa1cb1ccb87ec0df222680924ca3dab6c8bf
2022-03-18scripted-diff: rename TxRelay membersJohn Newbery
-BEGIN VERIFY SCRIPT- ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); } ren cs_filter m_bloom_filter_mutex ren fRelayTxes m_relay_txs ren pfilter m_bloom_filter ren cs_tx_inventory m_tx_inventory_mutex ren filterInventoryKnown m_tx_inventory_known_filter ren setInventoryTxToSend m_tx_inventory_to_send ren fSendMempool m_send_mempool ren nNextInvSend m_next_inv_send_time ren minFeeFilter m_fee_filter_received ren lastSentFeeFilter m_fee_filter_sent -END VERIFY SCRIPT-
2022-03-18[net processing] Move tx relay data to PeerJohn Newbery
2022-03-17Merge bitcoin-core/gui#555: Restore Send button when using external signerHennadii Stepanov
2efdfb88aab6496dcf2b98e0de30635bc6bade85 gui: restore Send for external signer (Sjors Provoost) 4b5a6cd14967b8ec3cb525e4cb18628de6c15091 refactor: helper function signWithExternalSigner() (Sjors Provoost) 026b5b4523317fdefc69cf5cec55f76f18ad0c0a move-only: helper function to present PSBT (Sjors Provoost) Pull request description: Fixes #551 For the simplest use case of a wallet with one external signer and "PSBT Controls" disabled in settings (the default), the send dialog will behave the same as when using a wallet with private keys. I.e. there's no "Create Unsigned" button. When PSBT controls are turned on, you can now actually make a PSBT with signing it; before this PR that button would trigger a sign event and would broadcast the transaction. In case a multisig, the Send button will sign on the device, and then fall back to presenting a PSBT (same behavior as before #441). This PR starts with two refactoring commits to move some stuff into a helper function for improved readability in general, and to make the main commit easier to review. ACKs for top commit: jonatack: utACK 2efdfb88aab6496dcf2b98e0de30635bc6bade85 diff review since my last review, code re-review, rebased to current master, verified clean debug build of each commit luke-jr: utACK 2efdfb88aab6496dcf2b98e0de30635bc6bade85 Tree-SHA512: e8731a0ef9e87564b2676c7b022b742d9621bba964c19dba9fd9f6961eb608737a9e1a22c0a3c8b2f2f6d583bba067606ee8392422e82082deefb20ea7b88c7c
2022-03-16gui: restore Send for external signerSjors Provoost
Before this change the send confirmation dialog would keep the Send option disabled. The Create Unsigned choice would actually send. This is potentially confusing. With this change the Create Unsigned button will not attempt to sign and always produce a PSBT. The Send button will attempt to sign, and only return a PSBT if more signatures are needed. When using an external signer, the Create Unsigned option only appears when PSBT controls are enabled in the wallet settings. This commit maintains the pre-existing behavior of filling the PSBT (without signing) even when not using an external signer. Closes #551 Co-authored-by: Jon Atack <jon@atack.com>
2022-03-16refactor: helper function signWithExternalSigner()Sjors Provoost
Does not change behavior. Review hint: git show --color-moved --color-moved-ws=allow-indentation-change
2022-03-16gui: peersWidget - ResizeToContents Age and IP/Netmask columnsrandymcmillan
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-03-16gui: add Age column to peers tabrandymcmillan
Co-authored-by: Jon Atack <jon@atack.com>
2022-03-16gui: add FormatPeerAge() utility helperJon Atack
Co-authored-by: randymcmillan <randy.lee.mcmillan@gmail.com>
2022-03-10Merge bitcoin-core/gui#563: qt: Remove network detection based on address in ↵Hennadii Stepanov
BIP21 b7dbc83f23f67048cd6f66f5587381d73fad4894 qt: Remove network detection based on address in BIP21 (laanwj) Pull request description: This is removes some ugly and brittle code that switches the global network to testnet based on a provided address. I think in practice it's very unlikely for testnet BIP21 payment URIs to be used, and if so it's for testing so it's easy enough to manually copy it. Or to specify `-testnet` explicitly. There is already no such case for `-regtest` or `-signet`. After this change it will only accept addresses for the explicitly selected network. Others will result in a "wrong network" popup. There is also a possibility for refactor after this as the initialization order of `PaymentServer::ipcParseCommandLine` isn't important anymore (well, it still has to be before `PaymentServer::ipcSendCommandLine`, maybe even merged with it), but I have not done so here. ACKs for top commit: jonatack: ACK b7dbc83f23f67048cd6f66f5587381d73fad4894 achow101: ACK b7dbc83f23f67048cd6f66f5587381d73fad4894 Tree-SHA512: ebc77c0e5c98f53fe254bcd0f94c9d1c06937b794346e95b14158860d5c607515e71d73b782d2726674dce86d6d4001085d473c6d1bc11c5e6c25ff3fb3cfa22
2022-03-10qt: Remove network detection based on address in BIP21laanwj
This is some very ugly and brittle code that switches the global network based on a provided address, remove it. I think in practice it's very unlikely for testnet BIP21 payment URIs to be used, and if so it's for testing so it's easy enough to manually copy it. Or to specify `-testnet` explicitly. There is already no case for `-regtest` or `-signet`.
2022-03-07qt: Avoid crash on startup if int specified in settings.jsonRyan Ofsky
Fix GUI startup crash reported by Rspigler in https://github.com/bitcoin/bitcoin/issues/24457 that happens if settings.json contains an integer value for any of the configuration options which GUI settings can currently clash with (-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy, -proxy, -onion, -onion, -lang, and -prune). Fix is a one-line change in ArgsManager::GetArg.
2022-03-07test: Add tests for GetArg methods / settings.json type coercionRyan Ofsky
Just add tests. No changes to application behavior. Tests will be updated in the next commit changing & improving current behavior. Include a Qt test for GUI startup crash reported by Rspigler in https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg behavior that happens if settings.json contains an integer value for any of the configuration options which GUI settings can currently clash with (-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy, -proxy, -onion, -onion, -lang, and -prune).