aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/wallet.cpp
Commit message (Collapse)AuthorAgeFilesLines
* refactor: Drop redundant wallet referenceJoão Barbosa2019-02-211-128/+127
|
* interfaces: Add remove to WalletJoão Barbosa2019-02-121-0/+4
|
* Merge #15153: gui: Add Open Wallet menuJonas Schnelli2019-02-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1951ea434 gui: Show indeterminate progress dialog while opening walllet (João Barbosa) 8847cdaaa gui: Add OpenWalletActivity (João Barbosa) 4c8982a88 interfaces: Avoid interface instance if wallet is null (João Barbosa) be82dea23 gui: Add thread to run background activity in WalletController (João Barbosa) 6c49a55b4 gui: Add Open Wallet menu (João Barbosa) 32a8c6abf gui: Add openWallet and getWalletsAvailableToOpen to WalletController (João Barbosa) ab288b4e5 interfaces: Add loadWallet to Node (João Barbosa) 17abc0fd5 wallet: Factor out LoadWallet (João Barbosa) Pull request description: The *Open Wallet* menu has all the available wallets currently not loaded. The list of the available wallets comes from `listWalletDir`. In the future the menu can be replaced by a custom dialog. <img width="674" alt="screenshot 2019-01-12 at 12 17 02" src="https://user-images.githubusercontent.com/3534524/51073166-ac041480-1664-11e9-8302-be81702bc146.png"> Tree-SHA512: ebfd75eee0c8264863748899843afab67dadb7dff21313c11e3cb5b6108d954978dd1f1ae786bc07580c5a771ea4ab38d18c1643c9b9b3683ed53f0f6c582e38
| * interfaces: Avoid interface instance if wallet is nullJoão Barbosa2019-02-041-1/+1
| |
* | Merge #15226: Allow creating blank (empty) wallets (alternative)MeshCollider2019-02-111-0/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7687f7873 [wallet] Support creating a blank wallet (Andrew Chow) Pull request description: Alternative (kind of) to #14938 This PR adds a `blank` parameter to the `createwallet` RPC to create a wallet that has no private keys initially. `sethdseed` can then be used to make a clean wallet with a custom seed. `encryptwallet` can also be used to make a wallet that is born encrypted. Instead of changing the version number as done in #14938, a wallet flag is used to indicate that the wallet should be blank. This flag is set at creation, and then unset when the wallet is no longer blank. A wallet becomes non-blank when a HD seed is set or anything is imported. The main change to create a blank wallet is primarily taken from #14938. Also with this, the term "blank wallet" is used instead of "empty wallet" to avoid confusion with wallets that have balance which would also be referred to as "empty". This is built on top of #15225 in order to fix GUI issues. Tree-SHA512: 824d685e11ac2259a26b5ece99c67a7bda94a570cd921472c464243ee356b7734595ad35cc439b34357135df041ed9cba951e6edac194935c3a55a1dc4fcbdea
| * | [wallet] Support creating a blank walletAndrew Chow2019-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | A blank wallet is a wallet that has no keys, script or watch only things. A new wallet flag indicating that it is blank will be set when the wallet is blank. Once it is no longer blank (a seed has been generated, keys or scripts imported, etc), the flag will be unset.
* | | wallet: Add lock annotation for mapAddressBookMarcoFalke2019-02-071-0/+1
| |/ |/|
* | Prefer boost::optional#get_value_or over #value_orBen Woosley2019-01-311-2/+2
|/ | | | | | | The latter is not defined in the earliest supported version of boost, 1.47. https://www.boost.org/doc/libs/1_47_0/libs/optional/doc/html/boost_optional/detailed_semantics.html https://travis-ci.org/bitcoin/bitcoin/jobs/486674823
* Merge #15225: GUI: Change the receive button to respond to keypool state ↵Wladimir J. van der Laan2019-01-311-0/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | changing 2bc4c3eaf96f5f8490fc79280422916c5d14cde3 Notify the GUI that the keypool has changed to set the receive button (Andrew Chow) 14bcdbe09cffaef9bcc51dd9de1645db3f0a93db Check for more than private keys disabled to show receive button (Andrew Chow) Pull request description: Currently the Receive button in the GUI is displayed enabled or disabled by the initial state of the wallet when the wallet is first loaded. The button is only enabled or disabled depending on whether the disable private keys flag is set when the wallet is loaded. However, future changes to the wallet means that this initial state and check may no longer be accurate. #14938 introduces empty wallets which do not have private keys. An empty wallet that is loaded should have the Receive button disabled, and then it should become enabled once `sethdseed` is used so that a keypool can be generated and new keys generated. Likewise, with #14075, a wallet can be loaded with no keypool initially, so the button should be disabled. Later, public keys can be imported into the keypool, at which time the button should become enabled. When the keypool runs out again (no new keys are generated as the keypool only consists of imports), the button should become disabled. This PR makes it so that the button becomes enabled and disabled as the keypool state changes. The check for whether to enable or disable the receive button has changed to checking whether it is possible to get new keys. It now checks for whether the wallet has an HD seed and, if not, whether the private keys are disabled. When an action happens which would make it possible for a new address to be retrieved or make it possible for a no more addresses to be retrieved, a signal is emitted which has the GUI recheck the conditions for the Receive button. These actions are setting a new HD seed, topping up the keypool, retrieving a key from the keypool, and returning a key to the keypool. Tree-SHA512: eff15a5337f4c64ecd7169414fb47053c04f6a0f0130341b6dd9799ac4d79f451e25284701c668971fca33f0909d5352a474a2c12349375bedfdb59b63077d50
| * Notify the GUI that the keypool has changed to set the receive buttonAndrew Chow2019-01-231-0/+4
| | | | | | | | | | | | Whenever the keypool changes (new keys generated, new seed set, keypool runs out, etc.), notify the GUI that the keypool has changed. The receive button can then be enabled and disabled as necessary.
* | Add time methods to the Chain interfaceRussell Yanofsky2019-01-151-2/+7
| | | | | | | | | | | | | | | | And use them to remove uses of chainActive and mapBlockIndex in wallet code This commit does not change behavior. Co-authored-by: Ben Woosley <[email protected]>
* | Add height, depth, and hash methods to the Chain interfaceRussell Yanofsky2019-01-151-3/+3
|/ | | | | | | | And use them to remove uses of chainActive and mapBlockIndex in wallet code This commit does not change behavior. Co-authored-by: Ben Woosley <[email protected]>
* Don't label transactions "Open" while catching upHennadii Stepanov2019-01-031-1/+3
| | | | | | Since the default `nSequence` is `0xFFFFFFFE` and locktime is enabled, the checking `wtx.is_final` is meaningless until the syncing has completed.
* Pass chain locked variables where neededRussell Yanofsky2018-11-061-21/+27
| | | | | | | | | This commit does not change behavior. All it does is pass new function parameters. It is easiest to review this change with: git log -p -n1 -U0 --word-diff-regex=.
* Remove uses of cs_main in wallet codeRussell Yanofsky2018-11-061-19/+36
| | | | | | | | This commit does not change behavior. It is easiest to review this change with: git log -p -n1 -U0
* Remove direct node->wallet calls in init.cppRussell Yanofsky2018-11-061-0/+12
| | | | | | | | | | | Route calls during node initialization and shutdown that would happen between a node process and wallet processes through the serializable `Chain::Client` interface, rather than `WalletInitInterface` which is now simpler and only deals with early initialization and parameter interaction. This commit mostly does not change behavior. The only change is that the "Wallet disabled!" and "No wallet support compiled in!" messages are now logged earlier during startup.
* Add skeleton chain and client classesRussell Yanofsky2018-11-061-0/+24
| | | | | This commit does not change behavior. It just adds new skeleton classes that don't do anything and aren't instantiated yet.
* Merge #14554: qt: Remove unused `adjustedTime` parameterWladimir J. van der Laan2018-11-051-6/+2
|\ | | | | | | | | | | | | | | | | | | 04972fefd12c2c764b5f2afee87228e8d90f2448 Remove unused `adjustedTime` parameter (Hennadii Stepanov) Pull request description: After merging #13622 the `adjustedTime` parameter in the `updateStatus` function is unused. Tree-SHA512: 1d0e03e7343f076ee0032fb721f8ba50571d579958001aab372a43e45b4de24c2bf3bd18c245071cbd69f61ef38182e19666c6f936d55c9085b73c848ba62626
| * Remove unused `adjustedTime` parameterHennadii Stepanov2018-10-281-6/+2
| | | | | | | | | | qt: After merging #13622 the `adjustedTime` is not used any more in wallet related functions.
* | wallet: Add Clang thread safety analysis annotationspracticalswift2018-10-091-1/+1
|/
* Merge #13825: [wallet] Kill accountsWladimir J. van der Laan2018-08-301-2/+1
|\ | | | | | | | | | | c9c32e6b844fc79467b7e24c6c916142a0d08484 [wallet] Kill accounts (John Newbery) Tree-SHA512: 783272e7df9042fb0a01826fa37a02b97218496459015d7457e56223da8690bdad930c223dd4a903a1d4df57f3f2f4a097d392d272a72419ea9a882b11e599f7
| * [wallet] Kill accountsJohn Newbery2018-08-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does the following changes: - [wallet] Remove 'account' argument from GetLegacyBalance() - GetLegacyBalance() is never called with an account argument. Remove the argument and helper functions. - [wallet] Remove CWallet::ListAccountCreditDebit() - Function no longer used. - [wallet] Remove AccountMove() - Function no longer used. - [wallet] Remove AddAccountingEntry() - Function no longer used. - [wallet] Remove GetAccountCreditDebit() - Function no longer used. - [wallet] Don't rewrite accounting entries when reordering wallet transactions. - Accounting entries are deprecated. Don't rewrite them to the wallet database when re-ordering transactions. - [wallet] Remove WriteAccountingEntry() - Function no longer used. - [wallet] Don't read acentry key-values from wallet on load. - [wallet] Remove ListAccountCreditDebit() - Function no longer used. - [wallet] Remove CAccountingEntry class - No longer used - [wallet] Remove GetLabelDestination - Function no longer used. - [wallet] Delete unused account functions - ReadAccount - WriteAccount - EraseAccount - DeleteLabel - [wallet] Remove fromAccount argument from CommitTransaction() - [wallet] Remove strFromAccount. - No longer used. - [wallet] Remove strSentAccount from GetAmounts(). - No longer used. - [wallet] Update zapwallettxes comment to remove accounts. - [wallet] Remove CAccount - No longer used - [docs] fix typo in release notes for PR 14023
* | Merge #13769: Mark single-argument constructors "explicit"MarcoFalke2018-08-271-2/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1ac3c983bf Mark single-argument constructors "explicit" (practicalswift) Pull request description: Mark single-argument constructors `explicit`. Rationale: * Avoid unexpected implicit promotions. From the developer notes: > **By default, declare single-argument constructors explicit.** > Rationale: This is a precaution to avoid unintended conversions that might arise when single-argument constructors are used as implicit conversion functions. Tree-SHA512: 7901ed5be808c9d0ecb5ca501e1bc0395987fe1b7941b8548cebac2ff08a14f7dab61fab374a69b9ba29a9295a04245c814325c7f95b97ae558af0780f111dfa
| * Mark single-argument constructors "explicit"practicalswift2018-07-261-2/+2
| |
* | Add compile time checking for all cs_main runtime locking assertionspracticalswift2018-08-261-3/+3
| |
* | wallet: Fix accidental use of the comma operatorpracticalswift2018-07-261-1/+1
|/
* Merge #9662: Add createwallet "disableprivatekeys" option: a sane mode for ↵Wladimir J. van der Laan2018-07-201-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | watchonly-wallets a3fa4d6a6acf19d640a1d5879a00aa1f059e2380 QA: Fix bug in -usecli logic that converts booleans to non-lowercase strings (Jonas Schnelli) 4704e5f074e57782d058404a594a7313cf170cf0 [QA] add createwallet disableprivatekey test (Jonas Schnelli) c7b8f343e99d9d53ea353ddce9a977f1886caf30 [Qt] Disable creating receive addresses when private keys are disabled (Jonas Schnelli) 2f15c2bc20d583b4c1788da78c9c635c36e03ed0 Add disable privatekeys option to createwallet (Jonas Schnelli) cebefba0855cee7fbcb9474b34e6779369e8e9ce Add option to disable private keys during internal wallet creation (Jonas Schnelli) 9995a602a639b64a749545b7c3bafbf67f97324f Add facility to store wallet flags (64 bits) (Jonas Schnelli) Pull request description: This mode ('createwallet {"disableprivatekeys": true}') is intended for a sane pure watch-only mode, ideal for a use-case where one likes to use Bitcoin-Core in conjunction with a hardware-wallet or another solutions for cold-storage. Since we have support for custom change addresses in `fundrawtransaction`, pure watch-only wallets including coin-selection are possible and do make sense for some use cases. This new mode disables all forms of private key generation and ensure that no mix between hot and cold keys are possible. Tree-SHA512: 3ebe7e8d54c4d4e5f790c348d4c292d456f573960a5b04d69ca5ef43a9217c7e7671761c6968cdc56f9a8bc235f3badd358576651af9f10855a0eb731f3fc508
| * [Qt] Disable creating receive addresses when private keys are disabledJonas Schnelli2018-07-121-0/+1
| |
* | Merge #13566: Fix get balancePieter Wuille2018-07-131-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 702ae1e21a [RPC] [wallet] allow getbalance to use min_conf and watch_only without accounts. (John Newbery) cf15761f6d [wallet] GetBalance can take a min_depth argument. (John Newbery) 0f3d6e9ab7 [wallet] factor out GetAvailableWatchOnlyBalance() (John Newbery) 7110c830f8 [wallet] deduplicate GetAvailableCredit logic (John Newbery) ef7bc8893c [wallet] Factor out GetWatchOnlyBalance() (John Newbery) 4279da4785 [wallet] GetBalance can take an isminefilter filter. (John Newbery) Pull request description: #12953 inadvertently removed the functionality to call `getbalance "*" <int> <bool>` to get the wallet's balance with either minconfs or include_watchonly. This restores that functionality (when `-deprecatedrpc=accounts`), and also makes it possible to call ``getbalance minconf=<int> include_watchonly=<bool>` when accounts are not being used. Tree-SHA512: 67e84de9291ed6d34b23c626f4dc5988ba0ae6c99708d02b87dd3aaad3f4b6baa6202a66cc2dadd30dd993a39de8036ee920fcaa8cbb1c5dfe606e6fac183344
| * [wallet] Factor out GetWatchOnlyBalance()John Newbery2018-06-281-1/+1
| |
* | Remove useless mapRequest tracking that just effects Qt display.Matt Corallo2018-07-091-1/+0
|/ | | | | | | I thought we had removed this a long time ago, TBH, its really confusing feedback to users that we display whether a tx was broadcast to immediate neighbor nodes, given that has little indication of whether the tx propagated very far.
* ui: Support wallets unloaded dynamicallyJoão Barbosa2018-06-181-0/+4
|
* wallet: Use shared pointer to retain wallet instanceJoão Barbosa2018-05-221-2/+3
|
* Add purpose arg to Wallet::getAddressJames O'Beirne2018-04-251-1/+7
| | | | Also make all arguments to getAddress required and document args at call sites.
* wallet: Make fee settings non-static membersMarcoFalke2018-04-231-0/+17
|
* Merge #11200: Allow for aborting rescans in the GUIJonas Schnelli2018-04-131-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | ae1d2b030 Give an error when rescan is aborted by the user (Andrew Chow) 69b01e6f8 Add cancel button to rescan progress dialog (Andrew Chow) Pull request description: A cancel button is added to the `showProgress` dialog that is used only for rescans. When clicked, `AbortRescan` is called directly to cancel the rescan. Rescans triggered from the debug console will now be cancelable by clicking the cancel button. Rescans triggered by a command (e.g. `importmulti`) will now give an error indicating that the rescan was aborted by the user (either by the `abortrescan` command or by clicking cancel). Tree-SHA512: 4bb14998766de686e2318fbc9805758eccf5dbe628a7257d072c9ae2fb4f61303a0876f49988d6e5eddb261969b8a307c81c0c2df0a42ae909a43d738af3dc1b
| * Add cancel button to rescan progress dialogAndrew Chow2018-04-121-0/+1
| | | | | | | | | | Adds a cancel button to the rescan progress dialog. When it is clicked, AbortRescan is called to abort a rescan
* | wallet: Remove redundant lambda function arg in handleTransactionChangedWladimir J. van der Laan2018-04-101-1/+1
| | | | | | | | | | | | | | | | Makes the build warning-clean again here: bitcoin/src/interfaces/wallet.cpp:425:18: warning: lambda capture 'this' is not used [-Wunused-lambda-capture] [fn, this](CWallet*, const uint256& txid, ChangeType status) { fn(txid, status); })); ^
* | Remove duplicate includespracticalswift2018-04-091-2/+0
|/
* scripted-diff: Avoid `interface` keyword to fix windows gitian buildRussell Yanofsky2018-04-071-0/+441
Rename `interface` to `interfaces` Build failure reported by Chun Kuan Lee <[email protected]> https://github.com/bitcoin/bitcoin/pull/10244#issuecomment-379434756 -BEGIN VERIFY SCRIPT- git mv src/interface src/interfaces ren() { git grep -l "$1" | xargs sed -i "s,$1,$2,g"; } ren interface/ interfaces/ ren interface:: interfaces:: ren BITCOIN_INTERFACE_ BITCOIN_INTERFACES_ ren "namespace interface" "namespace interfaces" -END VERIFY SCRIPT-