aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/walletdb.cpp
AgeCommit message (Collapse)Author
2017-06-06Wallet: Replace pwalletMain with a vector of wallet pointersLuke Dashjr
2017-06-05CWalletDB: Store the update counter per walletLuke Dashjr
2017-06-05wallet: Move nAccountingEntryNumber from static/global to CWalletLuke Dashjr
2017-06-05Bugfix: wallet: Increment "update counter" when modifying account stuffLuke Dashjr
2017-06-05Bugfix: wallet: Increment "update counter" only after actually making the ↵Luke Dashjr
applicable db changes to avoid potential races Also does all "update counter" access via IncrementUpdateCounter
2017-06-05scripted-diff: Fully remove BOOST_FOREACHJorge Timón
-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-
2017-05-18Merge #8329: Consensus: MOVEONLY: Move functions for tx verificationWladimir J. van der Laan
618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
2017-05-09[wallet] Remove CTransaction&() helper conversion operator from wallet ↵Karl-Johan Alm
implementation.
2017-04-20wallet: CWalletDB CDB composition not inheritanceWladimir J. van der Laan
CWalletDB now contains a CDB instead of inheriting from it. This makes it easier to replace the internal transaction with a different database, without leaking through internals.
2017-04-20wallet: Introduce database handle wrapperWladimir J. van der Laan
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.
2017-04-06MOVEONLY: tx functions to consensus/tx_verify.oJorge Timón
Functions related to transaction verification.
2017-04-03Replace uses of boost::filesystem with fsWladimir J. van der Laan
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' ```
2017-04-03Replace includes of boost/filesystem.h with fs.hWladimir J. van der Laan
This is step one in abstracting the use of boost::filesystem.
2017-04-01Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell
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.
2017-03-08Refactor: Remove using namespace <xxx> from wallet/Karl-Johan Alm
2017-03-06Rename FlushWalletDB -> CompactWalletDB, add function descriptionMatt Corallo
2017-03-06Use CScheduler for wallet flushing, remove ThreadFlushWalletDBMatt Corallo
2017-03-06[Wallet] refactor CWallet/CWalletDB/CDBJonas Schnelli
Try to hide CDB/bitdb behinde CWalletDB. Prepare for full wallet database abstraction.
2017-03-02Merge #9143: Refactor ZapWalletTxes to avoid layer violationsWladimir J. van der Laan
0165a56 Refactor ZapWalletTxes to avoid layer vialotions (Jonas Schnelli) Tree-SHA512: 51e3abbb866185817d14d685a65cb1070a7a60aa3db692670f3a5fdd328aad59afa765c5a6b13d9e8f6d219e735487f8c87998f2fb38fdd911c1fe19bea373b9
2017-02-15Add missing cs_wallet lock that triggers new lock held assertionRussell Yanofsky
A new AssertLockHeld(cs_wallet) call was added in commit a58370e "Dedup nTimeFirstKey update logic" (part of PR #9108). The lock held assertion will fail when loading prexisting wallets files from before the #9108 merge that have watch-only keys.
2017-02-10Use importmulti timestamp when importing watch only keysRussell Yanofsky
When importing a watch-only address over importmulti with a specific timestamp, the wallet's nTimeFirstKey is currently set to 1. After this change, the provided timestamp will be used and stored as metadata associated with watch-only key. This can improve wallet performance because it can avoid the need to scan the entire blockchain for watch only addresses when timestamps are provided. Also adds timestamp to validateaddress return value (needed for tests). Fixes #9034.
2017-02-10Dedup nTimeFirstKey update logicRussell Yanofsky
Also make nTimeFirstKey member variable private. This is just a cleanup change, it doesn't change behavior in any significant way.
2017-02-06Merge #9227: Make nWalletDBUpdated atomic to avoid a potential race.Wladimir J. van der Laan
d63ff62 Make nWalletDBUpdated atomic to avoid a potential race. (Patrick Strateman)
2017-01-24Refactor ZapWalletTxes to avoid layer vialotionsJonas Schnelli
2017-01-04Merge #9450: Increment MIT licence copyright header year on files modified ↵Wladimir J. van der Laan
in 2016 27765b6 Increment MIT Licence copyright header year on files modified in 2016 (isle2983)
2017-01-03Merge #8776: Wallet refactoring leading up to multiwalletPieter Wuille
5394b39 Wallet: Split main logic from InitLoadWallet into CreateWalletFromFile (Luke Dashjr) fb0c934 Wallet: Let the interval-flushing thread figure out the filename (Luke Dashjr)
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-21Make nWalletDBUpdated atomic to avoid a potential race.Patrick Strateman
2016-12-02Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo
2016-11-11Wallet: Let the interval-flushing thread figure out the filenameLuke Dashjr
2016-10-30Move CWalletDB::ReorderTransactions to CWalletPatrick Strateman
2016-09-02Merge #8629: C++11: s/boost::scoped_ptr/std::unique_ptr/Wladimir J. van der Laan
cdd79eb C++11: s/boost::scoped_ptr/std::unique_ptr/ (Jorge Timón)
2016-09-01C++11: s/boost::scoped_ptr/std::unique_ptr/Jorge Timón
2016-08-31Do not shadow variables.Pavel Janík
2016-08-29Merge #8564: [Wallet] remove unused code/conditions in ReadAtCursorPieter Wuille
beef966 [Wallet] remove unused code/conditions in ReadAtCursor (Jonas Schnelli)
2016-08-24Merge #8445: Move CWallet::setKeyPool to private section of CWallet.Wladimir J. van der Laan
8680d3a Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet (Patrick Strateman) e86eb71 Move CWallet::setKeyPool to private section of CWallet (Patrick Strateman)
2016-08-23[Wallet] remove unused code/conditions in ReadAtCursorJonas Schnelli
2016-08-19Use __func__ to get function name for output printingMarcoFalke
2016-08-17Move CWallet::setKeyPool to private section of CWalletPatrick Strateman
2016-07-29Split CWallet::AddToWallet into AddToWallet and LoadToWallet.Patrick Strateman
This removes the fFromLoadWallet flag in AddToWallet. These were already effectively two methods.
2016-07-09[Wallet] keep HD seed during salvagewalletJonas Schnelli
2016-05-31[Wallet] Add simplest BIP32/deterministic key generation implementationJonas Schnelli
2016-05-16Move BackupWallet to CWallet::BackupWalletPatrick Strateman
2016-05-09Fix insanity of CWalletDB::WriteTx and CWalletTx::WriteToDiskPatrick Strateman
2016-03-23Added companion removeprunedfunds call.instagibbs
2016-03-14[wallet] Move hardcoded file name out of log messagesMarcoFalke
2016-01-08c++11: add scoped enum fallbacks to CPPFLAGS rather than defining them locallyCory Fields
Due to include ordering, defining in one place was not enough to ensure correct usage. Use global defines so that we don't have to worry abou this ordering. Also add a comment in configure about the test.
2016-01-07Merge pull request #7229Wladimir J. van der Laan
fa33d97 [walletdb] Add missing LOCK() in Recover() for dummyWallet (MarcoFalke) fa14d99 [qa] check if wallet or blochchain maintenance changes the balance (MarcoFalke) fa0765d [qa] Cleanup wallet.py test (MarcoFalke)
2016-01-05c++11: detect and correct for boost builds with an incompatible abiCory Fields
This is ugly, but temporary. boost::filesystem will likely be dropped soon after c++11 is enabled. Otherwise, we could simply roll our own copy_file. I've fixed this at the buildsystem level for now in order to avoid mixing in functional changes. Explanation: If boost (prior to 1.57) was built without c++11, it emulated scoped enums using c++98 constructs. Unfortunately, this implementation detail leaked into the abi. This was fixed in 1.57. When building against that installed version using c++11, the headers pick up on the native c++11 scoped enum support and enable it, however it will fail to link. This can be worked around by disabling c++11 scoped enums if linking will fail. Add an autoconf test to determine incompatibility. At build-time, if native enums are being used (a c++11 build), and force-disabling them causes a successful link, we can be sure that there's an incompatibility and enable the work-around.
2015-12-19[walletdb] Add missing LOCK() in Recover() for dummyWalletMarcoFalke