aboutsummaryrefslogtreecommitdiff
path: root/src/qt
AgeCommit message (Collapse)Author
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
2018-03-21Qt: Warn users about invalid-BIP21 URI bitcoin://Alexey Ivanov
2018-03-21Fix typosDimitris Apostolou
2018-03-20Merge #12721: Qt: remove "new" button during receive-mode in addressbookWladimir J. van der Laan
d843db7 Qt: remove "new" button during receive-mode in addressbook (Jonas Schnelli) Pull request description: There are currently two ways how to generate new receiving addresses in the GUI (which leads to code duplication or required refactoring, see #12520). Since the address-book is probably something that should be removed in the long run, suppressing the new-button in receive-mode could be a first step in deprecating the address book. With this PR, users can still edit existing receiving address book entries and they can still create new sending address book entries. Tree-SHA512: abe8d1b44bc3e1b53826ccf9d2b3f764264337758d95ca1fe1ef1bac72d47608cf454055fce3720e06634f0a5841a752ce643b4505b47d6e322b6fc71296e961
2018-03-19Rename account to label where appropriateRussell Yanofsky
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 it 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.
2018-03-19Qt: remove "new" button during receive-mode in addressbookJonas Schnelli
2018-03-17wallet: Change output type globals to membersMarcoFalke
2018-03-15Merge #12621: Avoid querying unnecessary model data when filtering transactionsPieter Wuille
1ee72a819f qt: Avoid querying unnecessary model data when filtering transactions (João Barbosa) Pull request description: This change moves down model data querying to where it's needed. The worst case remains the same (all data is queried and the row passes) but for the average case it improves the filter performance. Tree-SHA512: 3bcaced029cb39dfbc5377246ce76634f9050ee3a3053db4d358fcbf4d8107c649e75841f21d69f1aebcaf1bbffe3eac784e6b03b366fdbbfec1e0da8f78d8ef
2018-03-14Merge #12080: Add support to search the address bookWladimir J. van der Laan
c316fdf [qt] Add support to search the address book (João Barbosa) Pull request description: This PR adds support to search the address book for both receiving and sending addresses. A specialisation of the `QSortFilterProxyModel` is added to implement the custom filtering. <img width="757" alt="screen shot 2018-01-03 at 16 05 57" src="https://user-images.githubusercontent.com/3534524/34528196-0347d61e-f0a0-11e7-9bd3-535e9e34ceb8.png"> <img width="759" alt="screen shot 2018-01-03 at 16 00 58" src="https://user-images.githubusercontent.com/3534524/34528202-07c99f24-f0a0-11e7-8e34-cff6a1ba2364.png"> Closes #623. Tree-SHA512: 316e646015c858fc70db6be72dc7922d5bb10a3399e7fa327c992e184cc37a124f11cffefab2dbe0d16bda790c7c0437db364686e66c40b4054b8250b4be15d0
2018-03-13Merge #9680: Unify CWalletTx constructionPieter Wuille
b4bc32a451 [wallet] Get rid of CWalletTx default constructor (Russell Yanofsky) a128bdc9e1 [wallet] Construct CWalletTx objects in CommitTransaction (Russell Yanofsky) Pull request description: Two commits: - `Construct CWalletTx objects in CommitTransaction` moves a bunch of CWalletTx initialization into CWallet::CommitTransaction to dedup some code and avoid future inconsistencies in how wallet transactions are created. - `Get rid of CWalletTx default constructor` does what is described and eliminates the possibility of empty transaction entries being inadvertently created by mapWallet[hash] accesses. Both of these changes were originally part of #9381 Tree-SHA512: af3841c4f0539e0662d81b33c5369fc70aa06ddde1c59cb00fb21c9e4c7d9ff47f1edc5040cb463af1333838802c56b3ef875b939e2b804ee45b8e0294a4371c
2018-03-13Merge #11041: Add LookupBlockIndexWladimir J. van der Laan
92fabcd44 Add LookupBlockIndex function (João Barbosa) 43a32b739 Add missing cs_lock in CreateWalletFromFile (João Barbosa) f814a3e8f Fix cs_main lock in LoadExternalBlockFile (João Barbosa) c651df8b3 Lock cs_main while loading block index in AppInitMain (João Barbosa) 02de6a6bc Assert cs_main is held when accessing mapBlockIndex (João Barbosa) Pull request description: Replace all `mapBlockIndex` lookups with the new `LookupBlockIndex()`. In some cases it avoids a second lookup. Tree-SHA512: ca31118f028a19721f2191d86f2dd398144d04df345694575a64aeb293be2f85785201480c3c578a0ec99690516205708558c0fd4168b09313378fd4e60a8412
2018-03-11qt: Avoid querying unnecessary model data when filtering transactionsJoão Barbosa
2018-03-11Allow to optional specify the directory for the blocks storageJonas Schnelli
2018-03-09scripted-diff: Convert 11 enums into scoped enums (C++11)practicalswift
-BEGIN VERIFY SCRIPT- sed -i 's/enum DBErrors/enum class DBErrors/g' src/wallet/walletdb.h git grep -l DB_ | xargs sed -i 's/DB_\(LOAD_OK\|CORRUPT\|NONCRITICAL_ERROR\|TOO_NEW\|LOAD_FAIL\|NEED_REWRITE\)/DBErrors::\1/g' sed -i 's/^ DBErrors::/ /g' src/wallet/walletdb.h sed -i 's/enum VerifyResult/enum class VerifyResult/g' src/wallet/db.h sed -i 's/\(VERIFY_OK\|RECOVER_OK\|RECOVER_FAIL\)/VerifyResult::\1/g' src/wallet/db.cpp sed -i 's/enum ThresholdState/enum class ThresholdState/g' src/versionbits.h git grep -l THRESHOLD_ | xargs sed -i 's/THRESHOLD_\(DEFINED\|STARTED\|LOCKED_IN\|ACTIVE\|FAILED\)/ThresholdState::\1/g' sed -i 's/^ ThresholdState::/ /g' src/versionbits.h sed -i 's/enum SigVersion/enum class SigVersion/g' src/script/interpreter.h git grep -l SIGVERSION_ | xargs sed -i 's/SIGVERSION_\(BASE\|WITNESS_V0\)/SigVersion::\1/g' sed -i 's/^ SigVersion::/ /g' src/script/interpreter.h sed -i 's/enum RetFormat {/enum class RetFormat {/g' src/rest.cpp sed -i 's/RF_\(UNDEF\|BINARY\|HEX\|JSON\)/RetFormat::\1/g' src/rest.cpp sed -i 's/^ RetFormat::/ /g' src/rest.cpp sed -i 's/enum HelpMessageMode {/enum class HelpMessageMode {/g' src/init.h git grep -l HMM_ | xargs sed -i 's/HMM_BITCOIN/HelpMessageMode::BITCOIN/g' sed -i 's/^ HelpMessageMode::/ /g' src/init.h sed -i 's/enum FeeEstimateHorizon/enum class FeeEstimateHorizon/g' src/policy/fees.h sed -i 's/enum RBFTransactionState/enum class RBFTransactionState/g' src/policy/rbf.h git grep -l RBF_ | xargs sed -i 's/RBF_TRANSACTIONSTATE_\(UNKNOWN\|REPLACEABLE_BIP125\|FINAL\)/RBFTransactionState::\1/g' sed -i 's/^ RBFTransactionState::/ /g' src/policy/rbf.h sed -i 's/enum BlockSource {/enum class BlockSource {/g' src/qt/clientmodel.h git grep -l BLOCK_SOURCE_ | xargs sed -i 's/BLOCK_SOURCE_\(NONE\|REINDEX\|DISK\|NETWORK\)/BlockSource::\1/g' sed -i 's/^ BlockSource::/ /g' src/qt/clientmodel.h sed -i 's/enum FlushStateMode {/enum class FlushStateMode {/g' src/validation.cpp sed -i 's/FLUSH_STATE_\(NONE\|IF_NEEDED\|PERIODIC\|ALWAYS\)/FlushStateMode::\1/g' src/validation.cpp sed -i 's/^ FlushStateMode::/ /g' src/validation.cpp sed -i 's/enum WitnessMode {/enum class WitnessMode {/g' src/test/script_tests.cpp sed -i 's/WITNESS_\(NONE\|PKH\|SH\)/WitnessMode::\1/g' src/test/script_tests.cpp sed -i 's/^ WitnessMode::/ /g' src/test/script_tests.cpp -END VERIFY SCRIPT-
2018-03-09Format timestamps using ISO 8601 formatting (e.g. "2018-02-28T12:34:56Z")practicalswift
* Z is the zone designator for the zero UTC offset. * T is the delimiter used to separate date and time. This makes it clear for the end-user that the date/time logged is specified in UTC and not in the local time zone.
2018-03-07[wallet] Construct CWalletTx objects in CommitTransactionRussell Yanofsky
Construct CWalletTx objects in CWallet::CommitTransaction, instead of having callers do it. This ensures CWalletTx objects are constructed in a uniform way and all fields are set. This also makes it possible to avoid confusing and wasteful CWalletTx copies in https://github.com/bitcoin/bitcoin/pull/9381 There is no change in behavior.
2018-03-07Merge #11687: External wallet filesWladimir J. van der Laan
be8ab7d08 Create new wallet databases as directories rather than files (Russell Yanofsky) 26c06f24e Allow wallet files not in -walletdir directory (Russell Yanofsky) d8a99f65e Allow wallet files in multiple directories (Russell Yanofsky) Pull request description: This change consists of three commits: * The first commit is a pure refactoring that removes the restriction that two wallets can only be opened at the same time if they are contained in the same directory. * The second commit removes the restriction that `-wallet` filenames can only refer to files in the `-walletdir` directory. * The third commit makes second commit a little safer by changing bitcoin to create wallet databases as directories rather than files, so they can be safely backed up. All three commits should be straightforward: * The first commit adds around 20 lines of new code and then updates a bunch of function signatures (generally updating them to take plain fs::path parameters, instead of combinations of strings, fs::paths, and objects like CDBEnv and CWalletDBWrapper). * The second commit removes two `-wallet` filename checks and adds some test cases to the multiwallet unit test. * The third commit just changes the mapping from specified wallet paths to bdb environment & data paths. --- **Note:** For anybody looking at this PR for the first time, I think you can skip the comments before _20 Nov_ and start reading at https://github.com/bitcoin/bitcoin/pull/11687#issuecomment-345625565. Comments before _20 Nov_ were about an earlier version of the PR that didn't include the third commit, and then confusion from not seeing the first commit. Tree-SHA512: 00bbb120fe0df847cf57014f75f1f7f1f58b0b62fa0b3adab4560163ebdfe06ccdfff33b4231693f03c5dc23601cb41954a07bcea9a4919c8d42f7d62bcf6024
2018-03-07Merge #12620: Remove TransactionTableModel::TxIDRoleWladimir J. van der Laan
3b26b6af7 qt: Remove TransactionTableModel::TxIDRole (João Barbosa) Pull request description: The role `TxIDRole` is a duplicate of `TxHashRole`. This change favours `TxHashRole`. Tree-SHA512: ad35933eae1cb6b242b25b8940d662c2c79c766732d76fdd410c80230ec084969294a8e5a126794707992a566076ef4452b592050f7af6c4fa7742891090803d
2018-03-07qt: Remove TransactionTableModel::TxIDRoleJoão Barbosa
2018-03-07Merge #11372: Address encoding cleanupWladimir J. van der Laan
92f1f8b31 Split off key_io_tests from base58_tests (Pieter Wuille) 119b0f85e Split key_io (address/key encodings) off from base58 (Pieter Wuille) ebfe217b1 Stop using CBase58Data for ext keys (Pieter Wuille) 32e69fa0d Replace CBitcoinSecret with {Encode,Decode}Secret (Pieter Wuille) Pull request description: This PR contains some of the changes left as TODO in #11167 (and built on top of that PR). They are not intended for backporting. This removes the `CBase58`, `CBitcoinSecret`, `CBitcoinExtKey`, and `CBitcoinExtPubKey` classes, in favor of simple `Encode`/`Decode` functions. Furthermore, all Bitcoin-specific logic (addresses, WIF, BIP32) is moved to `key_io.{h,cpp}`, leaving `base58.{h,cpp}` as a pure utility that implements the base58 encoding/decoding logic. Tree-SHA512: a5962c0ed27ad53cbe00f22af432cf11aa530e3efc9798e25c004bc9ed1b5673db5df3956e398ee2c085e3a136ac8da69fe7a7d97a05fb2eb3be0b60d0479655
2018-03-06Merge #12432: [qt] send: Clear All also resets coin control optionsWladimir J. van der Laan
f506c0a7f [qt] send: Clear All also resets coin control options (Sjors Provoost) Pull request description: This change makes it so that a custom change address and manual input selection are removed if the user clicks Clear All in the send screen. Tree-SHA512: 78746043a74c9c26ef476eb0df7ce95411683749d9f6b2747222eaac751e241ea7d4d7ce9e4e69ed0b19fa76754d8584e5bef5bba1ad6598f8e39c784b4264d2
2018-03-06Add LookupBlockIndex functionJoão Barbosa
2018-03-06Merge #12617: gui: Show messages as text not htmlWladimir J. van der Laan
6fbc0986f gui: Show messages as text not html (Wladimir J. van der Laan) Pull request description: Currently, error messages (such as InitError) are displayed as-is, which means Qt does auto detection on the format. This means that it's possible to inject HTML from the command line though e.g. specifying a wallet name with HTML in it. This isn't a direct security risk because fetching content from internet is disabled (and as far as I know we never report strings received from the network this way). However, it can be confusing. So explicitly force the format as text. Tree-SHA512: 96c9196f20552544b862071bca61817ef03653019cc3548023d435f3a9c48b6cd501fab3246783cb0be68c8c7bb1b865913d92070a7c4e84e82c6577709f0934
2018-03-06gui: Show messages as text not htmlWladimir J. van der Laan
Currently, error messages (such as InitError) are displayed as-is, which means Qt does auto detection on the format. This means that it's possible to inject HTML from the command line though e.g. specifying a wallet name with HTML in it. This isn't a direct security risk because fetching content from internet is disabled (and as far as I know we never report strings received from the network this way). However, it can be confusing. So explicitly force the format as text.
2018-03-06qt: Set modal overlay hide button as defaultJoão Barbosa
2018-03-06Qt: Ensure UI updates only come from the currently selected walletViewLuke Dashjr
2018-03-06Qt: Add a combobox to toolbar to select from multiple walletsLuke Dashjr
2018-03-06Qt: Load all wallets into WalletModelsLuke Dashjr
2018-03-05Merge #12501: [qt] Improved "custom fee" explanation in tooltipWladimir J. van der Laan
0bc095efd [qt] Improved "custom fee" explanation in tooltip (Randolf Richardson) Pull request description: Thanks to @dooglus for asking about this tooltip in Issue 12500. Reference: https://www.github.com/bitcoin/bitcoin/issues/12500 I would also appreciate it if someone can confirm that 1 kilobyte in this field indeed represents 1,000 bytes rather than 1,024 bytes (if it's supposed to be 1,024, then I'll gladly make the necessary changes to reflect this). Tree-SHA512: da2fe0128411b5ef6f0a26382a80601efcf823c3f3591bdd83a7fe7e25777728e7eb89e2e8b175b991566e63838aca12d204792f981031b86e7b2ba28ca50021
2018-03-05Merge #12580: Show a transaction's virtual size in its details dialogMarcoFalke
ee041196fc Show a transaction's virtual size in its details dialog. (Chris Moore) Pull request description: #12501 looks like it is going to mention transaction's "virtual size" in the custom fee tooltip, so let's display the virtual size when the user double-clicks a transaction. Tree-SHA512: c60ae23c9f86edfba086b840519941d8e8ee1be9da5987ffe6dee3255943ea5d215708ce57464f109a1d1c612c4c0eeb11f8f3e203d8a8cfc1f8ec753a8aac27
2018-03-03Allow wallet files in multiple directoriesRussell Yanofsky
Remove requirement that two wallet files can only be opened at the same time if they are contained in the same directory. This change mostly consists of updates to function signatures (updating functions to take fs::path arguments, instead of combinations of strings, fs::path, and CDBEnv / CWalletDBWrapper arguments).
2018-03-02Fix ListCoins test failure due to unset g_wallet_allow_fallback_feeRussell Yanofsky
New global variables were introduced in #11882 and not setting them causes: wallet/test/wallet_tests.cpp(638): error in "ListCoins": check wallet->CreateTransaction({recipient}, wtx, reservekey, fee, changePos, error, dummy) failed wallet/test/wallet_tests.cpp(679): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2] wallet/test/wallet_tests.cpp(686): error in "ListCoins": check available.size() == 2 failed [1 != 2] wallet/test/wallet_tests.cpp(705): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2] It's possible to reproduce the failure reliably by running: src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ListCoins Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug.
2018-03-01Show a transaction's virtual size in its details dialog.Chris Moore
2018-03-01[qt] Improved "custom fee" explanation in tooltipRandolf Richardson
2018-03-01Merge #11882: Disable default fallbackfee on mainnetWladimir J. van der Laan
3f592b8 [QA] add wallet-rbf test (Jonas Schnelli) 8222e05 Disable wallet fallbackfee by default on mainnet (Jonas Schnelli) Pull request description: Removes the default fallback fee on mainnet (but keeps it on testnet/regtest). Transactions using the fallbackfee in case the fallback fee has not been set are getting rejected. Tree-SHA512: e54d2594b7f954e640cc513a18b0bfbe189f15e15bdeed4fe02b7677f939bca1731fef781b073127ffd4ce08a595fb118259b8826cdaa077ff7d5ae9495810db
2018-03-01Merge #12421: [qt] navigate to transaction history page after sendWladimir J. van der Laan
e7d9fc5 [qt] navigate to transaction history page after send (Sjors Provoost) Pull request description: Before this change QT just remained on the Send tab, which I found confusing. Now it switches to the Transactions tab. This makes it more clear to the user that the send actually succeeded, and here they can monitor progress. Ideally I would like to highlight the transaction, e.g. by refactoring `TransactionView::focusTransaction(const QModelIndex &idx)` to accept a transaction hash, but I'm not sure how to do that. Tree-SHA512: 8aa93e03874de8434e18951f8aec47377814c0bcaf7eda4766fc41d5a4e32806346e12e4139e4d45468dfdf0b786f5a7faa393a31b8cd6c65ccac21fb3782c33