aboutsummaryrefslogtreecommitdiff
path: root/src/qt
AgeCommit message (Collapse)Author
2018-04-05Merge #10244: Refactor: separate gui from wallet and nodeWladimir J. van der Laan
9960137 Add developer notes about blocking GUI code (Russell Yanofsky) 9a61eed Use WalletBalances struct in Qt (Russell Yanofsky) 56f33ca Remove direct bitcoin calls from qt/sendcoinsdialog.cpp (Russell Yanofsky) e872c93 Remove direct bitcoin access from qt/guiutil.cpp (Russell Yanofsky) 5884558 Remove direct bitcoin calls from qt transaction table files (Russell Yanofsky) 3cab2ce Remove direct bitcoin calls from qt/paymentserver.cpp (Russell Yanofsky) 3ec2ebc Remove direct bitcoin calls from qt/addresstablemodel.cpp (Russell Yanofsky) 827de03 Remove direct bitcoin calls from qt/coincontroldialog.cpp (Russell Yanofsky) a0704a8 Remove most direct bitcoin calls from qt/walletmodel.cpp (Russell Yanofsky) 90d4640 Remove direct bitcoin calls from qt/optionsdialog.cpp (Russell Yanofsky) 582daf6 Remove direct bitcoin calls from qt/rpcconsole.cpp (Russell Yanofsky) 3034a46 Remove direct bitcoin calls from qt/bantablemodel.cpp (Russell Yanofsky) e0b66a3 Remove direct bitcoin calls from qt/peertablemodel.cpp (Russell Yanofsky) d7c2c95 Remove direct bitcoin calls from qt/intro.cpp (Russell Yanofsky) fe6f27e Remove direct bitcoin calls from qt/clientmodel.cpp (Russell Yanofsky) 5fba3af Remove direct bitcoin calls from qt/splashscreen.cpp (Russell Yanofsky) c2f672f Remove direct bitcoin calls from qt/utilitydialog.cpp (Russell Yanofsky) 3d619e9 Remove direct bitcoin calls from qt/bitcoingui.cpp (Russell Yanofsky) c0f2756 Remove direct bitcoin calls from qt/optionsmodel.cpp (Russell Yanofsky) 71e0d90 Remove direct bitcoin calls from qt/bitcoin.cpp (Russell Yanofsky) ea73b84 Add src/interface/README.md (Russell Yanofsky) Pull request description: This is a refactoring PR that does not change behavior in any way. This change: 1. Creates abstract [`Node`](https://github.com/ryanofsky/bitcoin/blob/pr/ipc-local/src/interface/node.h) and [`Wallet`](https://github.com/ryanofsky/bitcoin/blob/pr/ipc-local/src/interface/wallet.h) interfaces in [`src/interface/`](https://github.com/ryanofsky/bitcoin/tree/pr/ipc-local/src/interface) 1. Updates Qt code to call the new interfaces. This largely consists of diffs of the form: ```diff - InitLogging(); - InitParameterInteraction(); + node.initLogging(); + node.initParameterInteraction(); ``` This change allows followup PR #10102 (makes `bitcoin-qt` control `bitcoind` over an IPC socket) to work without any significant updates to Qt code. Additionally: * It provides a single place to describe the interface between GUI and daemon code. * It can make better GUI testing possible, because Node and Wallet objects have virtual methods that can be overloaded for mocking. * It can be used to help make the GUI more responsive (see https://github.com/bitcoin/bitcoin/issues/10504) Other notes: * I used python scripts [hide-globals.py](https://github.com/ryanofsky/home/blob/master/src/2017/hide-globals/hide-globals.py) and [replace-syms.py](https://github.com/ryanofsky/home/blob/master/src/2017/hide-globals/replace-syms.py) to identify all the places where Qt code was accessing libbitcoin global variables and calling functions accessing those global variables. * These changes were originally part of #10102. Thanks to @JeremyRubin for the suggestion of splitting them out. Commits: - [`ea73b84d2d` Add src/interface/README.md](https://github.com/bitcoin/bitcoin/pull/10244/commits/ea73b84d2ddde22487dee0f71d7a619051e067f2) - [`71e0d90876` Remove direct bitcoin calls from qt/bitcoin.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/71e0d90876efd11e2a4aeb8f3f806c5a1fd54b42) - [`c0f2756be5` Remove direct bitcoin calls from qt/optionsmodel.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/c0f2756be517feddacd7c6b89b9faa888b3fef8e) - [`3d619e9d36` Remove direct bitcoin calls from qt/bitcoingui.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/3d619e9d3658e36cba4a19a5bed33e5538317b27) - [`c2f672fb19` Remove direct bitcoin calls from qt/utilitydialog.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/c2f672fb1960399389dea9cdd8f76d7156c2c88b) - [`5fba3af21e` Remove direct bitcoin calls from qt/splashscreen.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/5fba3af21e44ab7552c57782de430c1f4cfd6697) - [`fe6f27e6ea` Remove direct bitcoin calls from qt/clientmodel.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/fe6f27e6ea68a139d3a98b30a53706008ef8b132) - [`d7c2c95948` Remove direct bitcoin calls from qt/intro.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/d7c2c9594897c39df6739b92610dfb5a7a1cb3ec) - [`e0b66a3b7c` Remove direct bitcoin calls from qt/peertablemodel.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/e0b66a3b7c5d3a079636d61fcf611bb6b36c7bc1) - [`3034a462a5` Remove direct bitcoin calls from qt/bantablemodel.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/3034a462a5d30144cf0ec801d07f0c8c36d560f3) - [`582daf6d22` Remove direct bitcoin calls from qt/rpcconsole.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/582daf6d22da5394d02a12003b9542d9f5865ae2) - [`90d4640b7e` Remove direct bitcoin calls from qt/optionsdialog.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/90d4640b7eff3154a0750c5acb52d39bd41e0bbb) - [`a0704a8996` Remove most direct bitcoin calls from qt/walletmodel.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/a0704a8996bb950ae3c4d5b5a30e9dfe34cde1d3) - [`827de038ab` Remove direct bitcoin calls from qt/coincontroldialog.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/827de038ab6fa58aa3d46151eb2f8dc6add7743e) - [`3ec2ebcd9b` Remove direct bitcoin calls from qt/addresstablemodel.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/3ec2ebcd9b4beb4277f1f4791c6acbc538784f70) - [`3cab2ce5f9` Remove direct bitcoin calls from qt/paymentserver.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/3cab2ce5f9e159ad5a2e9ed682f28121b5248580) - [`58845587e1` Remove direct bitcoin calls from qt transaction table files](https://github.com/bitcoin/bitcoin/pull/10244/commits/58845587e11140e81f087a74c3db76a4d1fc3a1a) - [`e872c93ee8` Remove direct bitcoin access from qt/guiutil.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/e872c93ee87477130fb877da1a536b4c693bbab9) - [`56f33ca349` Remove direct bitcoin calls from qt/sendcoinsdialog.cpp](https://github.com/bitcoin/bitcoin/pull/10244/commits/56f33ca349b3721a15fce3bf0b6d4fd7fd788970) - [`9a61eed1fc` Use WalletBalances struct in Qt](https://github.com/bitcoin/bitcoin/pull/10244/commits/9a61eed1fcc16ddcedc315045f470e1958b0760b) - [`9960137697` Add developer notes about blocking GUI code](https://github.com/bitcoin/bitcoin/pull/10244/commits/996013769711bd507cdcd6dde88cbd59fcd4fbad) Tree-SHA512: 7b9eff2f37d4ea21972d7cc6a3dbe144248595d6c330524396d867f3cd2841d666cdc040fd3605af559dab51b075812402f61d628d16cf13719335c1d8bf8ed3
2018-04-05Merge #12859: Bugfix: Include <memory> for std::unique_ptrWladimir J. van der Laan
a5bca13 Bugfix: Include <memory> for std::unique_ptr (Luke Dashjr) Pull request description: Not sure why all these includes were missing, but it's breaking builds for some users: https://bugs.gentoo.org/show_bug.cgi?id=652142 (Added to all files with a reference to `std::unique_ptr`) Tree-SHA512: 8a2c67513ca07b9bb52c34e8a20b15e56f8af2530310d9ee9b0a69694dd05e02e7a3683f14101a2685d457672b56addec591a0bb83900a0eb8e2a43d43200509
2018-04-04Use WalletBalances struct in QtRussell Yanofsky
Suggested by John Newbery <john@johnnewbery.com> https://github.com/bitcoin/bitcoin/pull/10244#discussion_r177504284
2018-04-04Remove direct bitcoin calls from qt/sendcoinsdialog.cppRussell Yanofsky
2018-04-04Remove direct bitcoin access from qt/guiutil.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt transaction table filesRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/paymentserver.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/addresstablemodel.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/coincontroldialog.cppRussell Yanofsky
2018-04-04Remove most direct bitcoin calls from qt/walletmodel.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/optionsdialog.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/rpcconsole.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/bantablemodel.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/peertablemodel.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/intro.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/clientmodel.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/splashscreen.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/utilitydialog.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/bitcoingui.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/optionsmodel.cppRussell Yanofsky
2018-04-04Remove direct bitcoin calls from qt/bitcoin.cppRussell Yanofsky
2018-04-02[moveonly] Extract HelpRequested to dry up the help options testingBen Woosley
This ensures consistency across interfaces and makes the version handling more clear.
2018-04-02Bugfix: Include <memory> for std::unique_ptrLuke Dashjr
2018-04-01Merge #12757: Clarify include guard naming conventionMarcoFalke
3bcc0059b8 Add lint-include-guards.sh which checks include guard consistency (practicalswift) 8fd6af89a0 Fix missing or inconsistent include guards (practicalswift) 8af65d96f4 Document include guard convention (practicalswift) Pull request description: * **Documentation**: Document include guard convention * **Fix**: Fix missing or inconsistent include guards * **Regression test**: Add `lint-include-guards.sh` which checks include guard consistency Tree-SHA512: 8171878f60fd08ccbea943a11e835195750592abb9d7ab74eaa4265ae7fac523b1da9d31ca13d6ab73dd596e49986bfb7593c696e5f39567c93e610165bc2acc
2018-03-30Merge #12780: Reduce variable scopesMarcoFalke
6a318e48a6 Reduce variable scopes (practicalswift) Pull request description: Reduce variable scopes. Tree-SHA512: 5c7735344024cb6cd310e739886dc811a64b640a0d6aac8b3d04f49e5987d6ff6676d978890bc84f1460527d92217176a79b007f0bf6b4147c04abfec2c67714
2018-03-29Merge #10762: [wallet] Remove Wallet dependencies from init.cppWladimir J. van der Laan
c7ec524 [wallet] Add dummy wallet init class (John Newbery) 49baa4a [wallet] Use global g_wallet_init_interface to init/destroy the wallet. (John Newbery) caaf972 [wallet] Create wallet init interface. (John Newbery) 5fb5421 [wallet] Move wallet init functions into WalletInit class. (John Newbery) Pull request description: This continues the work of #7965. This PR, along with several others, would remove the remaining dependencies from libbitcoin_server.a on libbitcoin_wallet.a. To create the interface, I've just translated all the old init.cpp wallet function calls into an interface class. I've not done any thinking about whether it makes sense to change that interface by combining/splitting those calls. This is a purely internal interface, so there's no problem in changing it later. Tree-SHA512: 32ea57615229c33fd1a7f2f29ebc11bf30337685f7211baffa899823ef74b65dcbf068289c557a161c5afffb51fdc38a2ee8180720371f64d433b12b0615cf3f
2018-03-27[wallet] Add dummy wallet init classJohn Newbery
2018-03-27Merge #12653: Allow to optional specify the directory for the blocks storageWladimir J. van der Laan
a192636 -blocksdir: keep blockindex leveldb database in datadir (Jonas Schnelli) f38e4fd QA: Add -blocksdir test (Jonas Schnelli) 386a6b6 Allow to optional specify the directory for the blocks storage (Jonas Schnelli) Pull request description: Since the actual block files taking up more and more space, it may be desirable to have them stored in a different location then the data directory (use case: SSD for chainstate, etc., HD for blocks). This PR adds a `-blocksdir` option that allows one to keep the blockfiles and the blockindex external from the data directory (instead of creating symlinks). I fist had an option to keep the blockindex within the datadir, but seems to make no sense since accessing the index will (always) lead to access (r/w) the block files. Tree-SHA512: f8b9e1a681679eac25076dc30e45e6e12d4b2d9ac4be907cbea928a75af081dbcb0f1dd3e97169ab975f73d0bd15824c00c2a34638f3b284b39017171fce2409
2018-03-27[wallet] Use global g_wallet_init_interface to init/destroy the wallet.John Newbery
This commit creates a global g_wallet_init_interface, which is created in bitcoind and bitcoin-qt. g_wallet_init_interface is used to init and destroy the wallet. This removes the dependency from init.cpp on the wallet library.
2018-03-27Merge #10742: scripted-diff: Use scoped enumerations (C++11, "enum class")Wladimir J. van der Laan
1f45e21 scripted-diff: Convert 11 enums into scoped enums (C++11) (practicalswift) Pull request description: Rationale (from Bjarne Stroustrup's ["C++11 FAQ"](http://www.stroustrup.com/C++11FAQ.html#enum)): > > The enum classes ("new enums", "strong enums") address three problems with traditional C++ enumerations: > > * conventional enums implicitly convert to int, causing errors when someone does not want an enumeration to act as an integer. > * conventional enums export their enumerators to the surrounding scope, causing name clashes. > * the underlying type of an enum cannot be specified, causing confusion, compatibility problems, and makes forward declaration impossible. > > The new enums are "enum class" because they combine aspects of traditional enumerations (names values) with aspects of classes (scoped members and absence of conversions). Tree-SHA512: 9656e1cf4c3cabd4378c7a38d0c2eaf79e4a54d204a3c5762330840e55ee7e141e188a3efb2b4daf0ef3110bbaff80d8b9253abf2a9b015cdc4d60b49ac2b914
2018-03-27Merge #12795: do not truncate .dat extension for wallets in guiJonas Schnelli
fc7c32fc6 do not truncate .dat extension for wallets in gui (Gregory Sanders) Pull request description: Truncating the extension results in wallet name ambiguity and the inability to use the wallet in GUI debug rpc console. Resolves #12794 Tree-SHA512: 89507918f597e9274148b45233b893c9f653da4f9e929415822165d47c67b55ad0b2d5ff53b508e942831d5213d5c15bce3fbdfbcb592a5c7f3dd5c1ca02cfb8
2018-03-27Merge #12793: qt: Avoid reseting on resetguisettigs=0Wladimir J. van der Laan
342fb80 qt: Avoid resetting on resetguisettigs=0 (MarcoFalke) Pull request description: Shouldn't be affecting anyone, but might still be worth to fix at some point. Tree-SHA512: af7fe67f1e8b3a0ff041258e3056d2e3e518258b015ee765f291e91fca86a7f7cd43c83844fd83f00a52dac2cf382db5d568aab91db636a031040551bd34172d
2018-03-27Merge #12779: Qt: Remove unused method setupAmountWidget(...)Wladimir J. van der Laan
3a0f8d7 Qt: Remove unused method setupAmountWidget(...) (practicalswift) Pull request description: Remove unused method `setupAmountWidget(...)`. Last use removed in f193c57a63d8e66835873ff05ef8028fa87b427f. Tree-SHA512: 8f25ed2da13cfbc0f2e042286b3c979ef03de960028d7824110bdc2ed96f5075e3b35a9809a09c83caa5bad2237d2e048ff212b19a0be1d07f79c19691dfcd87
2018-03-26do not truncate .dat extension for wallets in guiGregory Sanders
2018-03-26qt: Avoid resetting on resetguisettigs=0MarcoFalke
2018-03-26Merge #12610: Multiwallet for the GUIJonas Schnelli
779c5f984 Qt: hide RPCConsole wallet selector when no wallets are present (Jonas Schnelli) dc6f150f3 Qt: show wallet name in request dlg in case of multiwallet (Jonas Schnelli) 4826ca4b8 Qt: show wallet name in send confirmation dlg in case of multiwallet (Jonas Schnelli) cfa4133ce GUI: RPCConsole: Log wallet changes (Luke Dashjr) b6d04fc7c Qt: Get wallet name from WalletModel rather than passing it around (Luke Dashjr) 12d8d2681 Qt: When multiple wallets are used, include in notifications the name (Jonas Schnelli) d1ec34a76 Qt: QComboBox::setVisible doesn't work in toolbars, so defer adding it at all until needed (Luke Dashjr) d49cc70e6 Qt: Add wallet selector to debug console (Jonas Schnelli) d558f44c5 Bugfix: RPC: Add missing UnregisterHTTPHandler for /wallet/ (Luke Dashjr) 85d531971 Qt: Ensure UI updates only come from the currently selected walletView (Luke Dashjr) e449f9a9e Qt: Add a combobox to toolbar to select from multiple wallets (Luke Dashjr) 3dba3c3ac Qt: Load all wallets into WalletModels (Luke Dashjr) Pull request description: This is an overhaul of #11383 (plus some additions). It avoids unnecessary coupling of httpserver/jsonrpc and the wallet as well as it avoids pointer pure passing (and pointer deletion) of `CWallet` (plus other minor design changes). Additionally it adds the wallet name to the sendconfirmation and request dialog (in case multiwallet is active) Tree-SHA512: 3d06e18badbc5d1821e488bf1dae463bb0be544cf11b2b618e025812bfdd13c5f39604bb93b4c705313930e7dc4e66f4848b9469ba14871bade58e7a027246a1
2018-03-26Qt: hide RPCConsole wallet selector when no wallets are presentJonas Schnelli
2018-03-26Qt: show wallet name in request dlg in case of multiwalletJonas Schnelli
2018-03-26Qt: show wallet name in send confirmation dlg in case of multiwalletJonas Schnelli
2018-03-26GUI: RPCConsole: Log wallet changesLuke Dashjr
2018-03-26Qt: Get wallet name from WalletModel rather than passing it aroundLuke Dashjr
2018-03-26Qt: When multiple wallets are used, include in notifications the nameJonas Schnelli
2018-03-26Qt: QComboBox::setVisible doesn't work in toolbars, so defer adding it at ↵Luke Dashjr
all until needed
2018-03-26Qt: Add wallet selector to debug consoleJonas Schnelli
2018-03-26Reduce variable scopespracticalswift
2018-03-25Qt: Remove unused method setupAmountWidget(...)practicalswift
2018-03-22Merge #11536: Rename account to label where appropriateWladimir J. van der Laan
d2527bd Rename wallet_accounts.py test (Russell Yanofsky) 045eeb8 Rename account to label where appropriate (Russell Yanofsky) Pull request description: Rename account to label where appropriate This change only updates strings and adds RPC aliases, but should simplify the implementation of address labels in https://github.com/bitcoin/bitcoin/pull/7729, by getting renaming out of the way and letting that change focus on semantics. The difference between accounts and labels is that labels apply only to addresses, while accounts apply to both addresses and transactions (transactions have "from" and "to" accounts). The code associating accounts with transactions is clumsy and unreliable so we would like get rid of it. --- There is a rebased version of #7729 atop this PR at https://github.com/ryanofsky/bitcoin/commits/pr/label, see https://github.com/bitcoin/bitcoin/pull/7729#issuecomment-338417139. Tree-SHA512: b3f934e612922d6290f50137f8ba71ddfaea4485713c7d97e89400a8b73b09b254f9186dffa462c77f5847721f5af9852b5572ade5443d8ee95dd150b3edb7ff
2018-03-22Fix missing or inconsistent include guardspracticalswift
2018-03-21Merge #12723: Qt5: Warning users about invalid-BIP21 URI bitcoin://Wladimir J. van der Laan
b7fbcc5 Qt: Warn users about invalid-BIP21 URI bitcoin:// (Alexey Ivanov) Pull request description: This change affects only Qt5 users, since Qt4 QUrl don't forces lower case for urls. Also bitcoin-qt builds against Qt4 on linux. PR for #11645 Tree-SHA512: 6b8cb18b29dbd2754e190a662ed67274a7f0decc6adb00b7e1af107d5f8ea2845b668cf28d6ccf2f1d15e8ef212f5a76910810634a4c15e7fabd1dd2072e7232
2018-03-21Merge #12716: Fix typos and cleanup in various filesMarcoFalke
4d9b4256d8 Fix typos (Dimitris Apostolou) Pull request description: Unfortunately I messed up my repo while trying to squash #12593 so I created a PR with just the correct fixes. Tree-SHA512: 295d77b51bd2a9381f1802c263de7ffb2edd670d9647391e32f9a414705b3c8b483bb0e469a9b85ab6a70919ea13397fa8dfda2aea7a398b64b187f178fe6a06