aboutsummaryrefslogtreecommitdiff
path: root/src/qt/walletmodel.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [Qt] Prevent balloon-spam after rescanCozz Lovan2014-07-181-2/+11
|
* Watchonly balances are shown separately in gui.JaSK2014-07-021-2/+25
|
* qt: Hide unspendable outputs in coin controlWladimir J. van der Laan2014-07-021-2/+4
|
* Add support for watch-only addressesPieter Wuille2014-07-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | Changes: * Add Add/Have WatchOnly methods to CKeyStore, and implementations in CBasicKeyStore. * Add similar methods to CWallet, and support entries for it in CWalletDB. * Make IsMine in script/wallet return a new enum 'isminetype', rather than a boolean. This allows distinguishing between spendable and unspendable coins. * Add a field fSpendable to COutput (GetAvailableCoins' return type). * Mark watchonly coins in listunspent as 'watchonly': true. * Add 'watchonly' to validateaddress, suppressing script/pubkey/... in this case. Based on a patch by Eric Lombrozo. Conflicts: src/qt/walletmodel.cpp src/rpcserver.cpp src/wallet.cpp
* Formatting, spelling, comment fixes.Tom Harding2014-06-271-7/+7
|
* UI to alert of respend attempt affecting wallet.Tom Harding2014-06-271-0/+8
| | | | | | | | | | | | | | | | | Respend transactions that conflict with transactions already in the wallet are added to it. They are not displayed unless they also involve the wallet, or get into a block. If they do not involve the wallet, they continue not to affect balance. Transactions that involve the wallet, and have conflicting non-equivalent transactions, are highlighted in red. When the conflict first occurs, a modal dialog is thrown. CWallet::SyncMetaData is changed to sync only to equivalent transactions. When a conflict is added to the wallet, counter nConflictsReceived is incremented. This acts like a change in active block height for the purpose of triggering UI updates.
* Remove `using namespace std` from header fileWladimir J. van der Laan2014-06-161-0/+2
| | | | | It's considered bad form to import things into the global namespace in a header. Put it in the cpp files where it is needed instead.
* Type-safe CFeeRate classGavin Andresen2014-06-061-6/+0
| | | | | | | | Use CFeeRate instead of an int64_t for quantities that are fee-per-size. Helps prevent unit-conversion mismatches between the wallet, relaying, and mining code.
* qt: get required locks upfront in polling functionsWladimir J. van der Laan2014-04-231-11/+14
| | | | | | This avoids the GUI from getting stuck on periodical polls if the core is holding the locks for a longer time - for example, during a wallet rescan.
* Solve chainActive-related locking issuesWladimir J. van der Laan2014-04-181-10/+20
| | | | | | | | | | | - In wallet and GUI code LOCK cs_main as well as cs_wallet when necessary - In main.cpp SendMessages move the TRY_LOCK(cs_main) up, to encompass the call to IsInitialBlockDownload. - Make ActivateBestChain, AddToBlockIndex, IsInitialBlockDownload, InitBlockIndex acquire the cs_main lock Fixes #3997
* [Qt] rescan progressCozz Lovan2014-04-021-0/+30
|
* Remove CWalletTx::vfSpentGavin Andresen2014-02-261-0/+6
| | | | | | Use the spent outpoint multimap to figure out which wallet transaction outputs are unspent, instead of a vfSpent array that is saved to disk.
* Merge pull request #3646Wladimir J. van der Laan2014-02-161-1/+1
|\ | | | | | | 5770254 Copyright header updates s/2013/2014 on files whose last git commit was done in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does. (gubatron)
| * Copyright header updates s/2013/2014 on files whose last git commit was done ↵gubatron2014-02-091-1/+1
| | | | | | | | | | | | in 2014. contrib/devtools/fix-copyright-headers.py script to be able to perform this maintenance task with ease during the rest of the year, every year. Modifications to contrib/devtools/README.md to document what fix-copyright-headers.py does.
* | Handle "conflicted" transactions properlyGavin Andresen2014-02-141-2/+6
|/ | | | | | | | | | | | | | | | | | | | Extend CMerkleTx::GetDepthInMainChain with the concept of a "conflicted" transaction-- a transaction generated by the wallet that is not in the main chain or in the mempool, and, therefore, will likely never be confirmed. GetDepthInMainChain() now returns -1 for conflicted transactions (0 for unconfirmed-but-in-the-mempool, and >1 for confirmed). This makes getbalance, getbalance '*', and listunspent all agree when there are mutated transactions in the wallet. Before: listunspent: one 49BTC output getbalance: 96 BTC (change counted twice) getbalance '*': 46 BTC (spends counted twice) After: all agree, 49 BTC available to spend.
* Merge pull request #3567Wladimir J. van der Laan2014-01-221-0/+2
|\ | | | | | | 22a5120 [Qt] Show and store message of normal bitcoin:URI (Cozz Lovan)
| * [Qt] Show and store message of normal bitcoin:URICozz Lovan2014-01-211-0/+2
| |
* | [Qt] Permanently store requested payments in walletCozz Lovan2014-01-191-0/+24
|/
* [Qt] add missing lock in walletmodelCozz Lovan2014-01-141-0/+1
|
* qt: Add missing lock in WalletModel::listCoinsWladimir J. van der Laan2014-01-061-0/+1
| | | | Another problem detected by cs_wallet lock detection (#3401).
* qt: Add missing LOCKs for locked coin functionsWladimir J. van der Laan2014-01-061-0/+4
| | | | | These don't aquire the wallet lock internally, so the caller has to do it.
* [Qt] style-police, add missing license headersPhilip Kaufmann2013-12-171-1/+1
| | | | | - add missing license headers in Mac files - small code formating cleanups
* qt: keep a list of requested paymentsWladimir J. van der Laan2013-11-191-0/+8
| | | | | | | | | Keep a list of requested payments in the Receive tab so that a user can recall previously created requests after closing their windows. Currently this list is not stored between bitcoin-qt sessions. This can be implemented later, but it is not clear where it should be stored as I don't think it belongs in the wallet (maybe in QSettings?)
* Coin Control FeaturesCozz Lovan2013-11-141-6/+88
|
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-9/+16
| | | | | | | | | Use misc methods of avoiding unnecesary header includes. Replace int typedefs with int##_t from stdint.h. Replace PRI64[xdu] with PRI[xdu]64 from inttypes.h. Normalize QT_VERSION ifs where possible. Resolve some indirect dependencies as direct ones. Remove extern declarations from .cpp files.
* Merge pull request #3145Wladimir J. van der Laan2013-11-061-2/+2
|\ | | | | | | | | | | | | 395d0d5 rework an ugly hack in processPaymentRequest() (Philip Kaufmann) 952d2cd make processPaymentRequest() use a single SendCoinsRecipient (Philip Kaufmann) 983cef4 payment-request UI: use SendCoinsRecipient.message for memo (Philip Kaufmann) c6c97e0 [Qt] Rework of payment request UI (mainly for insecure pr) (Philip Kaufmann)
| * [Qt] Rework of payment request UI (mainly for insecure pr)Philip Kaufmann2013-10-311-2/+2
| | | | | | | | | | | | | | | | | | | | - this shows insecure (unsecured) payment requests in a new yellowish colored UI (based on the secure payment request UI) instead of our normal payment UI - allows us to receive paymentACK messages for insecure payment requests - allows us to handle expirations for insecure payment request - changed walletmodel, so that all types of payment requests don't touch the addressbook
* | qt: add license header to source filesWladimir J. van der Laan2013-11-041-0/+4
|/ | | | Closes #839
* Merge pull request #3069 from Diapolo/fix_addressbookWladimir J. van der Laan2013-10-151-14/+18
|\ | | | | don't touch addressbook when using secure payment-requests
| * don't touch addressbook when using secure payment-requestsPhilip Kaufmann2013-10-111-14/+18
| | | | | | | | | | | | | | - fixes #3006 by preventing addressbook changes when using secure payment-requests sq
* | Refactor/encapsulate chain globals into a CChain classPieter Wuille2013-10-111-2/+2
|/
* several small Qt-related fixesPhilip Kaufmann2013-09-281-1/+1
| | | | | | | | | - make BitcoinGUI::showPaymentACK() use a reference for msg and use our own GUIUtil::HtmlEscape() function - ensure QTimer usage in clientmodel is the same as in walletmodel - remove an unneeded debug message in walletframe - flag some parameters as unused in DebugMessageHandler() - small code formatting changes
* Bitcoin-Qt: Use qDebug() for printing to debug.logPhilip Kaufmann2013-09-061-9/+15
| | | | | - removes all usages of PrintDebugStringF from Qt code - ensure same format for all debug.log messages "functionname : Message"
* Merge pull request #2958 from laanwj/2013_08_txfee2Wladimir J. van der Laan2013-09-021-24/+35
|\ | | | | [Qt] Display txfee in first sendCoinsDialog message box
| * qt: Display txfee in first sendCoinsDialog message boxJonas Schnelli2013-08-311-24/+35
| | | | | | | | Signed-off-by: Jonas Schnelli <[email protected]>
* | qt: Handle address purpose in incremental updatesWladimir J. van der Laan2013-08-291-6/+11
|/ | | | | | Correctly use the purpose of addresses that are added after the start of the client. Addresses with purpose "refund" and "change" should not be visible in the GUI. This is now handled correctly.
* Payment Protocol: X509-validated payment requestsGavin Andresen2013-08-221-27/+69
| | | | | | | | Add support for a Payment Protocol to Bitcoin-Qt. Payment messages are protocol-buffer encoded and communicated over http(s), so this adds a dependency on the Google protocol buffer library, and requires Qt with OpenSSL support.
* Refactor: CAddressBookData for mapAddressBookGavin Andresen2013-08-221-2/+2
| | | | | | | | Straight refactor, so mapAddressBook stores a CAddressBookData (which just contains a std::string) instead of a std::string. Preparation for payment protocol work, which will add the notion of refund addresses to the address book.
* CreateTransaction: return strFailReason on failureGavin Andresen2013-05-031-1/+4
|
* fix "send coins" via context menu in address bookPhilip Kaufmann2013-04-011-0/+2
| | | | | | | - the send coins context menu entry was not working anymore, because a non current version of #2220 was merged onto current master - also removes some unneeded spaces and adds a comment to WalletModel::getNumTransactions()
* rework ThreadSafeAskFee() / askFee() functionsPhilip Kaufmann2012-12-041-1/+1
| | | | | - remove unused parameter from ThreadSafeAskFee(), which also results in the removal of an orphan translation-string
* Persistently poll for balance change when number of blocks changedWladimir J. van der Laan2012-07-111-15/+10
| | | | | | Fixes #1452. Until we can make the logic water-tight *and* are notified in every case the balance might have changed, remove the premature optimization and simply recompute the balance every half a second when the number of blocks changed.
* Add a timer to check for changes in immature or unconfirmed balances,Scott Ellis2012-07-061-13/+43
| | | | when these are non-zero. Fixed a minor mem leak.
* Merge pull request #837 from sje397/ShowImmatureBalanceWladimir J. van der Laan2012-06-021-3/+12
|\ | | | | Added 'immature balance' for miners. Only displayed if the balance is > 0
| * Added 'immature balance' for miners. Only displayed if the balance is ↵sje3972012-05-251-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | greater than zero. This adds a field labelled 'Immature' in the overview section under the 'unconfirmed' field, which shows mined income that has not yet matured (which is currently not displayed anywhere, even though the transactions exist in the transaction list). To do that I added a 'GetImmatureBalance' method to the wallet, and connected that through to the GUI as per the 'GetBalance' and 'GetUnconfirmedBalance' methods. I did a small 'no-op' change to make the code in adjacent functions a little more readable (imo); it was a change I had made in my repo earlier...but I thought it wouldn't hurt so left it in. Immature balance comes from mined income that is at least two blocks deep in the chain (same logic as displayed transactions). My reasoning is: - as a miner, it's a critical stat I want to see - as a miner, and taking into account the label 'immature', the uncertainty is pretty clearly implied - those numbers are already displayed in the transaction list - this makes the overview numbers add up to what's in the transaction list - it's not displayed if the immature balance is 0, so won't bother non-miners I also 'cleaned' the overview UI a little, moving code to the XML and removing HTML.
* | Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille2012-05-241-6/+8
|/ | | | | | | | | | | | | | | | | This introduces internal types: * CKeyID: reference (hash160) of a key * CScriptID: reference (hash160) of a script * CTxDestination: a boost::variant of the former two CBitcoinAddress is retrofitted to be a Base58 encoding of a CTxDestination. This allows all internal code to only use the internal types, and only have RPC and GUI depend on the base58 code. Furthermore, the header dependencies are a lot saner now. base58.h is at the top (right below rpc and gui) instead of at the bottom. For the rest: wallet -> script -> keystore -> key. Only keystore still requires a forward declaration of CScript. Solving that would require splitting script into two layers.
* Process address book updates incrementallyWladimir J. van der Laan2012-05-201-6/+7
| | | | | - No longer invalidates selection model, thus retains selection on address book changes - Fixes selection of new address when added
* Convert UI interface to boost::signals2.Wladimir J. van der Laan2012-05-201-1/+48
| | | | | | | | - Signals now go directly from the core to WalletModel/ClientModel. - WalletModel subscribes to signals on CWallet: Prepares for multi-wallet support, by no longer assuming an implicit global wallet. - Gets rid of noui.cpp, the few lines that were left are merged into init.cpp - Rename wxXXX message flags to MF_XXX, to make them UI indifferent. - ThreadSafeMessageBox no longer returns the value `4` which was never used, converted to void.
* Fine-grained UI updatesWladimir J. van der Laan2012-05-201-8/+16
| | | | | | | | | | | | | | | | | | | Gets rid of `MainFrameRepaint` in favor of specific update functions that tell the UI exactly what changed. This improves the efficiency of various handlers. Also fixes problems with mined transactions not showing up until restart. The following notifications were added: - `NotifyBlocksChanged`: Block chain changed - `NotifyKeyStoreStatusChanged`: Wallet status (encrypted, locked) changed. - `NotifyAddressBookChanged`: Address book entry changed. - `NotifyTransactionChanged`: Wallet transaction added, removed or updated. - `NotifyNumConnectionsChanged`: Number of connections changed. - `NotifyAlertChanged`: New, updated or cancelled alert. As this finally makes it possible for the UI to know when a new alert arrived, it can be shown as OS notification. These notifications could also be useful for RPC clients. However, currently, they are ignored in bitcoind (in noui.cpp). Also brings back polling with timer for numBlocks in ClientModel. This value updates so frequently during initial download that the number of signals clogs the UI thread and causes heavy CPU usage. And after initial block download, the value changes so rarely that a delay of half a second until the UI updates is unnoticable.
* fix #952 by checking if we have a new address or an updated labelPhilip Kaufmann2012-05-041-3/+10
|