aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * scripted-diff: Remove #include <boost/foreach.hpp>Jorge Timón2017-06-221-1/+0
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp -END VERIFY SCRIPT-
* | Merge #9895: Turn TryCreateDirectory() into TryCreateDirectories()Wladimir J. van der Laan2017-06-141-1/+1
|\ \ | |/ |/| | | | | | | 1d1ea9f Turn TryCreateDirectory() into TryCreateDirectories() (Marko Bencun) Tree-SHA512: 49a524167bcf66e351a964c88d09cb3bcee12769a32da83410e3ba649fa4bcdbf0478d41e4d09bb55adb9b3f122e742271db6feb30bbafe2a7973542b5f10f79
| * Turn TryCreateDirectory() into TryCreateDirectories()Marko Bencun2017-06-141-1/+1
| | | | | | | | | | | | | | | | Use case: TryCreateDirectory(GetDataDir() / "blocks" / "index") would fail if the blocks directory was not explicitly created before. The line that did so was in a weird location and could be removed as a result.
* | Merge #10502: scripted-diff: Remove BOOST_FOREACH, Q_FOREACH and PAIRTYPEPieter Wuille2017-06-131-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 1238f13cf scripted-diff: Remove PAIRTYPE (Jorge Timón) 18dc3c396 scripted-diff: Remove Q_FOREACH (Jorge Timón) 7c00c2672 scripted-diff: Fully remove BOOST_FOREACH (Jorge Timón) a5410ac5e Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal (Jorge Timón) Tree-SHA512: d3ab4a173366402e7dcef31608977b757d4aa07abbbad2ee1bcbcfa311e994a4552f24e5a55272cb22c2dcf89a4b0495e02e9d9aceae4b08c0bab668f20e324c
| * | scripted-diff: Fully remove BOOST_FOREACHJorge Timón2017-06-051-1/+1
| |/ | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* | Merge #8694: Basic multiwallet supportWladimir J. van der Laan2017-06-121-8/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c237bd7 wallet: Update formatting (Luke Dashjr) 9cbe8c8 wallet: Forbid -salvagewallet, -zapwallettxes, and -upgradewallet with multiple wallets (Luke Dashjr) a2a5f3f wallet: Base backup filenames on original wallet filename (Luke Dashjr) b823a4c wallet: Include actual backup filename in recovery warning message (Luke Dashjr) 84dcb45 Bugfix: wallet: Fix warningStr, errorStr argument order (Luke Dashjr) 008c360 Wallet: Move multiwallet sanity checks to CWallet::Verify, and do other checks on all wallets (Luke Dashjr) 0f08575 Wallet: Support loading multiple wallets if -wallet used more than once (Luke Dashjr) b124cf0 Wallet: Replace pwalletMain with a vector of wallet pointers (Luke Dashjr) 19b3648 CWalletDB: Store the update counter per wallet (Luke Dashjr) 74e8738 Bugfix: ForceSetArg should replace entr(ies) in mapMultiArgs, not append (Luke Dashjr) 23fb9ad wallet: Move nAccountingEntryNumber from static/global to CWallet (Luke Dashjr) 9d15d55 Bugfix: wallet: Increment "update counter" when modifying account stuff (Luke Dashjr) f28eb80 Bugfix: wallet: Increment "update counter" only after actually making the applicable db changes to avoid potential races (Luke Dashjr) Tree-SHA512: 23f5dda58477307bc07997010740f1dc729164cdddefd2f9a2c9c7a877111eb1516d3e2ad4f9b104621f0b7f17369c69fcef13d28b85cb6c01d35f09a8845f23
| * | wallet: Base backup filenames on original wallet filenameLuke Dashjr2017-06-061-2/+2
| | |
| * | wallet: Include actual backup filename in recovery warning messageLuke Dashjr2017-06-061-7/+8
| | |
| * | Wallet: Replace pwalletMain with a vector of wallet pointersLuke Dashjr2017-06-061-5/+0
| | |
| * | CWalletDB: Store the update counter per walletLuke Dashjr2017-06-051-0/+10
| |/
* | Merge #10546: Remove 33 unused Boost includesWladimir J. van der Laan2017-06-111-1/+0
|\ \ | | | | | | | | | | | | | | | 49de096 Remove unused Boost includes (practicalswift) Tree-SHA512: ff2dad94f9eeb1dc50fcffd0e94e1686be04e4e5bc45f58ae955d630c15cd25bb8f5583d0aa1f2f263b5a723be79747ef3c6e6b417c7be7787c0abc8d1874019
| * | Remove unused Boost includespracticalswift2017-06-091-1/+0
| | |
* | | Merge #10521: Limit variable scopePieter Wuille2017-06-091-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | 90593ed92 Limit variable scope (practicalswift) Tree-SHA512: 4719e303688a31aefbe1d239e86b21dd3c2045524e08bd628c6ba0c6c2a97de14d04305b9beafe0b1dcde7229793e6663168953f192e88ed409be5c30fd2a9a9
| * | Limit variable scopepracticalswift2017-06-051-1/+1
| |/
* / Remove unused variablespracticalswift2017-06-031-1/+0
|/
* Remove unused C++ code not covered by unit testspracticalswift2017-04-261-9/+0
|
* wallet: Reduce references to global bitdb environmentWladimir J. van der Laan2017-04-201-32/+42
|
* wallet: Get rid of fFileBackedWladimir J. van der Laan2017-04-201-3/+9
| | | | | | Instead, CWalletDB() with a dummy handle will just give you a no-op database in which writes always succeeds and reads always fail. CDB already had functionality for this, so just use that.
* wallet: Introduce database handle wrapperWladimir J. van der Laan2017-04-201-6/+52
| | | | | | | | Abstract database handle from explicit strFilename into CWalletDBWrapper. Also move CWallet::Backup to db.cpp - as it deals with representation details this is a database specific operation.
* Use fsbridge for fopen and freopenWladimir J. van der Laan2017-04-031-1/+1
| | | | | | | Abstracts away how a path is opened to a `FILE*`. Reduces the number of places where path is converted to a string for anything else but printing.
* Replace uses of boost::filesystem with fsWladimir J. van der Laan2017-04-031-12/+12
| | | | | | | | | Step two in abstracting away boost::filesystem. To repeat this, simply run: ``` git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g' ```
* Replace includes of boost/filesystem.h with fs.hWladimir J. van der Laan2017-04-031-1/+1
| | | | This is step one in abstracting the use of boost::filesystem.
* Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell2017-04-011-9/+9
| | | | | | | | | | | | | | | | | This changes the logging categories to boolean flags instead of strings. This simplifies the acceptance testing by avoiding accessing a scoped static thread local pointer to a thread local set of strings. It eliminates the only use of boost::thread_specific_ptr outside of lockorder debugging. This change allows log entries to be directed to multiple categories and makes it easy to change the logging flags at runtime (e.g. via an RPC, though that isn't done by this commit.) It also eliminates the fDebug global. Configuration of unknown logging categories now produces a warning.
* Rename first iterator to prevent shadowing.Pavel Janík2017-03-181-4/+4
|
* Refactor: Remove using namespace <xxx> from wallet/Karl-Johan Alm2017-03-081-20/+17
|
* [Wallet] refactor CWallet/CWalletDB/CDBJonas Schnelli2017-03-061-2/+165
| | | | | Try to hide CDB/bitdb behinde CWalletDB. Prepare for full wallet database abstraction.
* Merge #9227: Make nWalletDBUpdated atomic to avoid a potential race.Wladimir J. van der Laan2017-02-061-3/+0
|\ | | | | | | d63ff62 Make nWalletDBUpdated atomic to avoid a potential race. (Patrick Strateman)
| * Make nWalletDBUpdated atomic to avoid a potential race.Patrick Strateman2016-12-211-3/+0
| |
* | Merge #9353: Add data() method to CDataStream (and use it)Pieter Wuille2017-01-091-4/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | 5113474 wallet: Use CDataStream.data() (Wladimir J. van der Laan) e2300ff bench: Use CDataStream.data() (Wladimir J. van der Laan) adff950 dbwrapper: Use new .data() method of CDataStream (Wladimir J. van der Laan) a2141e4 streams: Remove special cases for ancient MSVC (Wladimir J. van der Laan) af4c44c streams: Add data() method to CDataStream (Wladimir J. van der Laan)
| * | wallet: Use CDataStream.data()Wladimir J. van der Laan2016-12-151-4/+4
| |/
* / Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
|/ | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Do not shadow variables.Pavel Janík2016-08-311-3/+3
|
* Berkeley DB v6 compatibility fixAlexey Vesnin2016-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | Fixes building error looking like this: CXX wallet/libbitcoin_wallet_a-db.o wallet/db.cpp: In member function ‘void CDBEnv::EnvShutdown()’: wallet/db.cpp:46:16: error: call of overloaded ‘DbEnv(int)’ is ambiguous DbEnv(0).remove(strPath.c_str(), 0); ^ wallet/db.cpp:46:16: note: candidates are: In file included from wallet/db.h:21:0, from wallet/db.cpp:6: /usr/include/db_cxx.h:916:2: note: DbEnv::DbEnv(const DbEnv&) DbEnv(const DbEnv &); ^ /usr/include/db_cxx.h:518:2: note: DbEnv::DbEnv(DB_ENV) DbEnv(DB_ENV *dbenv); ^ /usr/include/db_cxx.h:516:2: note: DbEnv::DbEnv(u_int32_t) DbEnv(u_int32_t flags); ^ Makefile:5780: recipe for target 'wallet/libbitcoin_wallet_a-db.o' failed make[2]: ** [wallet/libbitcoin_wallet_a-db.o] Error 1
* [Wallet] remove unused code/conditions in ReadAtCursorJonas Schnelli2016-08-231-1/+1
|
* CDB: fix debug outputcrowning-2016-08-181-1/+1
| | | It doesn't really help to clear a variable before printing it to the debug log.
* Merge #7537: wallet: Warn on unexpected EOF while salvaging walletWladimir J. van der Laan2016-02-291-3/+19
|\ | | | | | | ca8fb59 wallet: Warn on unexpected EOF while salvaging wallet (Wladimir J. van der Laan)
| * wallet: Warn on unexpected EOF while salvaging walletWladimir J. van der Laan2016-02-151-3/+19
| | | | | | | | | | | | | | | | Check for EOF before every getline, and warn when reading gets to EOF before the end of the data. Stricter error checking could shed more light on issues such as #7463 and #7379.
* | test: test leading space for ParseHexWladimir J. van der Laan2016-02-151-3/+3
|/ | | | | | BerkeleyDB dump files have key and value lines indented. The salvage code passes these to ParseHex as-is. Check this in the tests (should just pass with current code).
* [walletdb] Fix syntax error in key parserMarcoFalke2016-01-201-1/+1
|
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Constrain constant values to a single location in codeLuke Dashjr2015-11-281-1/+1
|
* Bugfix: Describe dblogsize option correctly (it refers to the wallet ↵Luke Dashjr2015-10-011-1/+1
| | | | database, not memory pool)
* fix crash on shutdown when e.g. changing -txindex and abort actionPhilip Kaufmann2015-06-161-6/+6
| | | | | | | | - fixes #3136 - the problem is related to Boost path and a static initialized internal pointer - using a std::string in CDBEnv::EnvShutdown() prevents the problem - this removes the boost::filesystem::path path field from CDBEnv
* use constant references for strings in functions in wallet/*.*Philip Kaufmann2015-03-211-2/+2
|
* [Move Only] Move wallet related things to src/wallet/Jonas Schnelli2015-03-121-0/+462
could once be renamed from /src/wallet to /src/legacywallet.