aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * AddToWallet implies BindWalletWladimir J. van der Laan2014-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | Now that AddToWallet is called when loading transactions from the wallet database, BindWallet can be integrated into that and does not need to be an extra step. Leaves behaviour unchanged, but makes the fFromLoadWallet/!fFromLoadWallet paths in AddToWallet a bit more symmetric.
* | [Qt] rescan progressCozz Lovan2014-04-021-6/+14
| |
* | Fix missing wallet lock in CWallet::SyncTransaction(..)Cozz Lovan2014-03-111-4/+3
| |
* | Merge pull request #3696Wladimir J. van der Laan2014-03-111-0/+6
|\ \ | |/ |/| | | | | c4656e0 Add progress to initial display of latest block downloaded. (R E Broadley) 75b8953 Display progress of rescan. (R E Broadley)
| * Display progress of rescan.R E Broadley2014-02-191-0/+6
| |
* | Merge pull request #3694 from gavinandresen/vfspentGavin Andresen2014-02-281-187/+83
|\ \ | | | | | | Remove CWalletTx::vfSpent
| * | Remove CWalletTx::vfSpentGavin Andresen2014-02-261-187/+83
| | | | | | | | | | | | | | | | | | 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 #3735 from laanwj/2014_02_remove_PRIx64_completelyGavin Andresen2014-02-261-5/+5
|\ \ \ | |/ / |/| | Remove PRIx64 usage completely
| * | Get rid of C99 PRI?64 usage in source filesWladimir J. van der Laan2014-02-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amend to d5f1e72. It turns out that BerkelyDB was including inttypes.h indirectly, so we cannot fix this with just macros. Trivial commit: apply the following script to all .cpp and .h files: # Middle sed -i 's/"PRIx64"/x/g' "$1" sed -i 's/"PRIu64"/u/g' "$1" sed -i 's/"PRId64"/d/g' "$1" # Initial sed -i 's/PRIx64"/"x/g' "$1" sed -i 's/PRIu64"/"u/g' "$1" sed -i 's/PRId64"/"d/g' "$1" # Trailing sed -i 's/"PRIx64/x"/g' "$1" sed -i 's/"PRIu64/u"/g' "$1" sed -i 's/"PRId64/d"/g' "$1" After this commit, `git grep` for PRI.64 should turn up nothing except the defines in util.h.
* | | Merge pull request #3704 from gavinandresen/wallet_lock_fixesGavin Andresen2014-02-241-18/+23
|\ \ \ | |/ / |/| | Wallet locking fixes for -DDEBUG_LOCKORDER
| * | Wallet locking fixes for -DDEBUG_LOCKORDERGavin Andresen2014-02-181-18/+23
| |/ | | | | | | | | | | | | | | | | | | | | Compiling with -DDEBUG_LOCKORDER and running the qa/rpc-test/ regression tests uncovered a couple of wallet methods that should (but didn't) acquire the cs_wallet mutext. I also changed the AssertLockHeld() routine print to stderr and abort, instead of printing to debug.log and then assert()'ing. It is annoying to look in debug.log to find out which AssertLockHeld is failing.
* / Don't use PRIx64 formatting derives from inttypes.hWladimir J. van der Laan2014-02-221-2/+0
|/ | | | | | | | | | | | As the tinyformat-based formatting system (introduced in b77dfdc) is type-safe, no special format characters are needed to specify sizes. Tinyformat can support (ignore) the C99 prefixes such as "ll" but chokes on MSVC's inttypes.h defines prefixes such as "I64X". So don't include inttypes.h and define our own for compatibility. (an alternative would be to sweep the entire codebase using sed -i to get rid of the size specifiers but this has less diff impact)
* 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.
* | Merge pull request #3671 from gavinandresen/txn_conflictsGavin Andresen2014-02-151-2/+98
|\ \ | | | | | | Report transaction conflicts, and tentative account balance fix
| * | Track and report wallet transaction clonesGavin Andresen2014-02-141-2/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a "walletconflicts" array to transaction info; if a wallet transaction is mutated, the alternate transaction id or ids are reported there (usually the array will be empty). Metadata from the original transaction is copied to the mutant, so the transaction time and "from" account of the mutant are reported correctly.
* | | Merge pull request #3669 from gavinandresen/dead_txnsGavin Andresen2014-02-141-1/+5
|\| | | | | | | | Handle "conflicted" transactions properly
| * | Handle "conflicted" transactions properlyGavin Andresen2014-02-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Add -zapwallettxes cli/config option, used for wallet recoveryJeff Garzik2014-02-141-0/+24
|/ / | | | | | | | | This diagnostic tool removes all "tx" records from the wallet db, then forces a full rescan, to rebuild "tx" records accurately.
* | Rename IsConfirmed to IsTrusted to better match the intended behavior.Gregory Maxwell2014-02-121-4/+4
| | | | | | | | This doesn't change the functionality at all.
* | Add option to avoid spending unconfirmed changeWladimir J. van der Laan2014-02-111-1/+2
| |
* | remove setting methods in wallet/walletdbCozz Lovan2014-02-071-19/+0
|/
* Remove redundant .c_str()sWladimir J. van der Laan2014-01-231-14/+14
| | | | | | | After the tinyformat switch sprintf() family functions support passing actual std::string objects. Remove unnecessary c_str calls (236 of them) in logging and formatting.
* [Qt] Permanently store requested payments in walletCozz Lovan2014-01-191-0/+3
|
* wallet: add interface for storing generic data on destinationsWladimir J. van der Laan2014-01-191-0/+51
|
* Merge pull request #3401Wladimir J. van der Laan2014-01-061-0/+18
|\ | | | | | | | | | | 012ca1c LoadWallet: acquire cs_wallet mutex before clearing setKeyPool (Wladimir J. van der Laan) 9569168 Document cs_wallet lock and add AssertLockHeld (Wladimir J. van der Laan) 19a5676 Use mutex pointer instead of name for AssertLockHeld (Wladimir J. van der Laan)
| * LoadWallet: acquire cs_wallet mutex before clearing setKeyPoolWladimir J. van der Laan2013-12-191-1/+1
| | | | | | | | | | Make the function mutex-aware, to prevent having to lock cs_wallet at the call site in Init.
| * Document cs_wallet lock and add AssertLockHeldWladimir J. van der Laan2013-12-191-0/+18
| | | | | | | | | | Add locking assertions to wallet to all methods that access internal fields and do not aquire the cs_wallet mutex.
* | Merge pull request #3412Wladimir J. van der Laan2013-12-191-0/+2
|\ \ | |/ |/| | | | | | | | | | | | | | | c3a7f51 Move `verifymessage` from rpcwallet to rpcmisc (Wladimir J. van der Laan) 723a03d Move `createmultisig` from rpcwallet to rpcmisc (Wladimir J. van der Laan) 452955f Move `validateaddress` from rpcwallet to rpcmisc (Wladimir J. van der Laan) cd7fa8b Move `nTransactionFee` from main.cpp to wallet.cpp (Wladimir J. van der Laan) a943bde Move `settxfee` from rpcblockchain to rpcwallet (Wladimir J. van der Laan) 16bc9aa Move `getinfo` from rpcnet to rpcmisc (Wladimir J. van der Laan) 652e156 add new RPC implementation file `rpcmisc.cpp` (Wladimir J. van der Laan)
| * Move `nTransactionFee` from main.cpp to wallet.cppWladimir J. van der Laan2013-12-131-0/+2
| | | | | | | | | | Transaction fee is only used by the wallet. No need for it to be in main.cpp.
* | Remove unused ThreadSafeAskFee from ui_interfaceWladimir J. van der Laan2013-12-141-6/+3
|/ | | | | | ThreadSafeAskFee is effectively unused. It is only called when the fAskFee parameter on SendMoney or SendMoneyToDestination is true, which never happens. Remove it.
* Merge pull request #3356Wladimir J. van der Laan2013-12-051-0/+4
|\ | | | | | | d3ef9b0 Prevent empty transactions from being added to vtxPrev (Wladimir J. van der Laan)
| * Prevent empty transactions from being added to vtxPrevWladimir J. van der Laan2013-12-041-0/+4
| | | | | | | | | | | | | | | | CWalletTx::AddSupportingTransactions() was adding empty transaction to vtxPrev in some cases. Skip over these. Part one of the solution to #3190. This prevents invalid vtxPrev from entering the wallet, but not current ones being transmitted.
* | Refuse to retransmit transactions without vinsWladimir J. van der Laan2013-12-041-1/+4
|/ | | | | | | Versions of bitcoin before 0.8.6 have a bug that inserted empty transactions into the vtxPrev in the wallet, which will cause the node to be banned when retransmitted, hence add a check for !tx.vin.empty() before RelayTransaction.
* Sanitize assert usage and refuse to compile with NDEBUG.Gregory Maxwell2013-12-021-1/+3
| | | | | | | | There were quite a few places where assert() was used with side effects, making operation with NDEBUG non-functional. This commit fixes all the cases I know about, but also adds an #error on NDEBUG because the code is untested without assertions and may still have vulnerabilities if used without assert.
* Add verbose boolean to getrawmempoolGavin Andresen2013-11-301-9/+1
| | | | | Also changes mempool to store CTxMemPoolEntries to keep track of when they enter/exit the pool.
* Refactor: move GetValueIn(tx) to tx.GetValueIn()Gavin Andresen2013-11-301-1/+1
| | | | GetValueIn makes more sense as a CTransaction member.
* Merge pull request #3257Wladimir J. van der Laan2013-11-201-1/+0
|\ | | | | | | 379778b core: remove includes in .cpp, if header is already in .h (Philip Kaufmann)
| * core: remove includes in .cpp, if header is already in .hPhilip Kaufmann2013-11-151-1/+0
| | | | | | | | | | - example: if util.h includes stdint.h, remove it from util.cpp, as util.h is the first header included in util.cpp
* | Coincontrol cleanup (e.g. add missing license)Philip Kaufmann2013-11-181-1/+1
| | | | | | | | | | | | | | | | | | - add missing license headers - make compatible with Qt5 - enforce header cleanup style - small code style cleanups - rename Coin Control dialog into Coin Control Address Selection - use default font for the windows labels (no monospace)
* | Coin Control FeaturesCozz Lovan2013-11-141-21/+43
| |
* | pass nBytes as parameter to GetMinFee(..)Cozz Lovan2013-11-141-1/+1
|/
* Cleanup code using forward declarations.Brandon Dahler2013-11-101-87/+91
| | | | | | | | | 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.
* Break dependency of init on wallet.Pieter Wuille2013-10-261-0/+19
| | | | | | This required some code movement (what was CWalletTx::AcceptToMemoryPool doing in main?), and adding a few explicit includes that used to be implicit through init.h.
* Use boost signals for callbacks from main to walletPieter Wuille2013-10-261-12/+8
|
* Remove broken PrintWallet functionalityPieter Wuille2013-10-261-13/+0
|
* Do not treat fFromMe transaction differently when broadcastingPieter Wuille2013-10-261-14/+0
|
* Merge branch 'bugfix_unknownoutputs' of git://github.com/luke-jr/bitcoinGavin Andresen2013-10-221-6/+19
|\ | | | | | | | | | | Conflicts: src/wallet.cpp Fixed LogPrint/printf merge conflict.
| * Bugfix: Avoid trying to parse outputs that aren't relevant to ↵Luke Dashjr2013-07-171-6/+19
| | | | | | | | | | | | CWalletTx::GetAmounts This fixes a warning when an output we aren't concerned with can't be parsed.
* | Merge pull request #3074 from laanwj/2013_10_remove_default_key_1Gavin Andresen2013-10-201-19/+0
|\ \ | | | | | | Remove automatic update of default key