aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert NACK'd fixes for 0.7.2.Luke Dashjr2012-11-161-4/+4
| | | | | | | | | This reverts commits: - 220de9aafbdb76fa620531fc5c0b01ffa6616d7b Qt: small header changes / fixes - caeafd1bd1b217276005c6bb422136f379d881cf fix some double-spaces in strings - deb9f100a04dbb9c25d6ba320eba4c653a2f5423 fix some double-spaces in strings - 65cee0bbbdea49c08bc84be7824ab004cc19f57e don't use memset() in privacy/security relevant code parts - ff31f1fa10e2062465520ad8a3ff846c23b7a96f don't use memset() in privacy/security relevant code parts
* Prevent RPC 'move' from deadlockingPieter Wuille2012-11-161-3/+7
| | | | | It seemed to create two CWalletDB objects that both grab the database lock.
* Merge branch '0.6.x' into 0.7.xLuke Dashjr2012-11-141-4/+4
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/bitcoinrpc.cpp src/crypter.h src/main.cpp src/qt/bitcoin.cpp src/qt/qtipcserver.cpp src/util.cpp
| * Merge branch '0.6.0.x' into 0.6.xLuke Dashjr2012-11-141-4/+4
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/init.cpp src/main.cpp src/serialize.h
| | * Merge branch '0.5.x' into 0.6.0.xLuke Dashjr2012-11-141-4/+4
| | |\
| | | * fix some double-spaces in stringsPhilip Kaufmann2012-11-121-4/+4
| | | | | | | | | | | | | | | | (partial of 6b3783a9c9cc47afcf72aa0a86ea26122392efdb)
| * | | Merge branch '0.6.0.x' into 0.6.xLuke Dashjr2012-09-071-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bitcoin-qt.pro src/qt/locale/bitcoin_ca_ES.ts src/qt/locale/bitcoin_cs.ts src/qt/locale/bitcoin_da.ts src/qt/locale/bitcoin_de.ts src/qt/locale/bitcoin_es.ts src/qt/locale/bitcoin_es_CL.ts src/qt/locale/bitcoin_eu_ES.ts src/qt/locale/bitcoin_fa.ts src/qt/locale/bitcoin_fa_IR.ts src/qt/locale/bitcoin_fi.ts src/qt/locale/bitcoin_fr_FR.ts src/qt/locale/bitcoin_he.ts src/qt/locale/bitcoin_hr.ts src/qt/locale/bitcoin_hu.ts src/qt/locale/bitcoin_it.ts src/qt/locale/bitcoin_lt.ts src/qt/locale/bitcoin_nb.ts src/qt/locale/bitcoin_nl.ts src/qt/locale/bitcoin_pl.ts src/qt/locale/bitcoin_pt_BR.ts src/qt/locale/bitcoin_ro_RO.ts src/qt/locale/bitcoin_ru.ts src/qt/locale/bitcoin_sk.ts src/qt/locale/bitcoin_sr.ts src/qt/locale/bitcoin_sv.ts src/qt/locale/bitcoin_tr.ts src/qt/locale/bitcoin_uk.ts src/qt/locale/bitcoin_zh_CN.ts src/qt/locale/bitcoin_zh_TW.ts
| | * | Merge branch '0.5.x' into 0.6.0.xLuke Dashjr2012-09-061-1/+1
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qt/locale/bitcoin_da.ts src/qt/locale/bitcoin_de.ts src/qt/locale/bitcoin_es.ts src/qt/locale/bitcoin_es_CL.ts src/qt/locale/bitcoin_hu.ts src/qt/locale/bitcoin_it.ts src/qt/locale/bitcoin_nb.ts src/qt/locale/bitcoin_nl.ts src/qt/locale/bitcoin_pt_BR.ts src/qt/locale/bitcoin_ru.ts src/qt/locale/bitcoin_uk.ts src/qt/locale/bitcoin_zh_CN.ts src/qt/locale/bitcoin_zh_TW.ts
| | | * Merge branch '0.4.x' into 0.5.xLuke Dashjr2012-09-061-1/+1
| | | |\
| | | | * Correct LoadWallet() return value (false -> DB_LOAD_OK)xanatos2012-09-061-1/+1
| | | | | | | | | | | | | | | | | | | | Equivalent code. (false == 0 == DB_LOAD_OK). Fixes #1706.
| * | | | Merge branch '0.6.0.x' into 0.6.xLuke Dashjr2012-08-121-2/+2
| |\| | |
| | * | | Merge branch '0.5.x' into 0.6.0.xLuke Dashjr2012-08-121-2/+2
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/key.h src/keystore.h src/net.h src/protocol.cpp src/qt/guiutil.h src/test/DoS_tests.cpp
| | | * | Merge branch '0.4.x' into 0.5.xLuke Dashjr2012-08-121-2/+2
| | | |\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/net.cpp
| | | | * Bugfix: Fix a variety of misspellingsLuke Dashjr2012-08-121-2/+2
| | | | | | | | | | | | | | | | | | | | (PARTIAL: Left out anything changing debug.log)
| | | | * Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen2012-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | (this fixes a Mac OS X gitian build error for 0.5.x)
| | | * | Use std::numeric_limits<> for typesafe INT_MAX/etcGavin Andresen2012-06-141-1/+1
| | | | | | | | | | | | | | | | | | | | (this fixes a Mac OS X gitian build error for 0.5.x)
| | | * | Merge branch '0.4.x' into 0.5.xLuke Dashjr2012-05-221-1/+2
| | | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/ui.cpp src/ui.h src/uibase.cpp src/xpm/about.xpm
| | | | * Update License in File HeadersFordy2012-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
| | | | * Always check return values of TxnBegin() and TxnCommit()Jeff Garzik2012-05-181-1/+2
| | | | | | | | | | | | | | | | | | | | PARTIAL, since d68dcf7 isn't backported (yet)
| | | * | Update License in File HeadersFordy2012-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
| | | * | Merge branch '0.4.x' into 0.5.xLuke Dashjr2012-04-221-7/+7
| | | |\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/main.cpp
| | | | * Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik2012-04-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
| | | * | Merge branch '0.4.x' into 0.5.0.xLuke Dashjr2012-04-151-0/+2
| | | |\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/keystore.h
| | | | * fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]Wladimir J. van der Laan2012-04-151-0/+2
| | | | |
| | | * | Merge branch '0.4.x' into 0.5.0.xLuke Dashjr2012-03-031-1/+1
| | | |\|
| | | | * Free pwalletdbEncryption after encryping walletPieter Wuille2012-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes a memory leak.
| | | | * Never remove database files on shutdown, it caused unreadable wallets on ↵Gavin Andresen2011-11-201-3/+1
| | | | | | | | | | | | | | | | | | | | some testers' machines.
| | | | * Only remove database log files on shutdown after wallet encryption/rewriteGavin Andresen2011-11-171-2/+3
| | | | |
| | | | * Create new keypool for newly encrypted wallets.Gavin Andresen2011-11-171-1/+32
| | | | |
| | | | * Obsolete keypool and make sure database removes log files on shutdown.Gavin Andresen2011-11-151-7/+14
| | | | |
| | | | * ResilveringPieter Wuille2011-11-151-0/+10
| | | | |
| | | | * Add returns to avoid annoying compile-time warnings.Matt Corallo2011-11-021-0/+1
| | | | |
| | | * | Implement an mlock()'d string class for storing passphrasesDylan Noblesmith2011-12-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SecureString is identical to std::string except with secure_allocator substituting for std::allocator. This makes casting between them impossible, so converting between the two at API boundaries requires calling ::c_str() for now.
| * | | | Merge branch '0.6.0.x' into 0.6.xLuke Dashjr2012-05-221-1/+2
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bitcoin-qt.pro doc/README doc/README_windows.txt share/setup.nsi src/bitcoinrpc.h src/db.h src/headers.h src/init.cpp src/main.cpp src/main.h src/noui.h src/qt/bitcoin.cpp src/qt/locale/bitcoin_en.ts src/qt/walletmodel.cpp src/script.cpp src/ui_interface.h src/util.cpp
| | * | | Update License in File HeadersFordy2012-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
| | * | | Always check return values of TxnBegin() and TxnCommit()Jeff Garzik2012-05-181-1/+2
| | | | |
| | * | | Fix loop index var types, fixing many minor sign comparison warningsJeff Garzik2012-04-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | foo.size() typically returns an unsigned integral type; make loop variables match those types' signedness.
| | * | | fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]Wladimir J. van der Laan2012-04-151-0/+2
| | | | |
| * | | | Update License in File HeadersFordy2012-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I originally created a pull to replace the "COPYING" in crypter.cpp and crypter.h, but it turned out that COPYING was actually the correct file.
* | | | | Handle corrupt wallets gracefully.Gavin Andresen2012-10-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrupt wallets used to cause a DB_RUNRECOVERY uncaught exception and a crash. This commit does three things: 1) Runs a BDB verify early in the startup process, and if there is a low-level problem with the database: + Moves the bad wallet.dat to wallet.timestamp.bak + Runs a 'salvage' operation to get key/value pairs, and writes them to a new wallet.dat + Continues with startup. 2) Much more tolerant of serialization errors. All errors in deserialization are reported by tolerated EXCEPT for errors related to reading keypairs or master key records-- those are reported and then shut down, so the user can get help (or recover from a backup). 3) Adds a new -salvagewallet option, which: + Moves the wallet.dat to wallet.timestamp.bak + extracts ONLY keypairs and master keys into a new wallet.dat + soft-sets -rescan, to recreate transaction history This was tested by randomly corrupting testnet wallets using a little python script I wrote (https://gist.github.com/3812689)
* | | | | fix -Wformat warnings all over the sourcePhilip Kaufmann2012-10-011-3/+3
| | | | |
* | | | | Merge pull request #1717 from Diapolo/Qt_change_TX_displayWladimir J. van der Laan2012-09-201-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Qt: show mined transactions at depth 1
| * | | | | Qt: show mined transactions at depth 1Philip Kaufmann2012-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - before, we used to show them in GUI when depth >= 2, which could lead to confusion of users, as the RPC behaviour already showed the Tx
* | | | | | Merge branch 'refactor_times' of git://github.com/luke-jr/bitcoinGavin Andresen2012-09-181-1/+8
|\ \ \ \ \ \
| * | | | | | Bugfix: Initialize CWallet::nOrderPosNext on an empty wallet, and save it in dbLuke Dashjr2012-09-081-1/+8
| | | | | | |
* | | | | | | Correct LoadWallet() return value (false -> DB_LOAD_OK)xanatos2012-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Equivalent code. (false == 0 == DB_LOAD_OK). Fixes #1706.
* | | | | | | Merge pull request #1738 from laanwj/2012_08_boostthreadJeff Garzik2012-09-041-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | implement CreateThread with boost::thread
| * | | | | | | Rename CreateThread to NewThreadWladimir J. van der Laan2012-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevent clash with win32 API symbol
* | | | | | | | Merge pull request #1774 from luke-jr/refactor_timesGavin Andresen2012-09-021-4/+4
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| / / / / / / | |/ / / / / / Bugfix: Require OrderedTxItems to provide properly scoped accounting entry list
| * | | | | | Bugfix: Require OrderedTxItems to provide properly scoped accounting entry listLuke Dashjr2012-09-021-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OrderedTxItems returns a multimap of pointers, but needs a place to store the actual CAccountingEntries it points to. It had been using a stack item, which was clobbered as soon as it returned, resulting in undefined behaviour. This fixes at least bug #1768.