aboutsummaryrefslogtreecommitdiff
path: root/src/dbwrapper.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright headers to 2018DrahtBot2018-07-271-1/+1
|
* [logging] Comment all continuing logs.John Newbery2018-04-071-1/+1
| | | | | | | Most logs should terminated with a '\n'. Some logs are built up over multiple calls to logPrintf(), so do not need a newline terminater. Comment all of these 'continued' logs as a linter hing.
* Merge #12859: Bugfix: Include <memory> for std::unique_ptrWladimir J. van der Laan2018-04-051-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | a5bca13 Bugfix: Include <memory> for std::unique_ptr (Luke Dashjr) Pull request description: Not sure why all these includes were missing, but it's breaking builds for some users: https://bugs.gentoo.org/show_bug.cgi?id=652142 (Added to all files with a reference to `std::unique_ptr`) Tree-SHA512: 8a2c67513ca07b9bb52c34e8a20b15e56f8af2530310d9ee9b0a69694dd05e02e7a3683f14101a2685d457672b56addec591a0bb83900a0eb8e2a43d43200509
| * Bugfix: Include <memory> for std::unique_ptrLuke Dashjr2018-04-021-0/+1
| |
* | Merge #12784: Fix bug in memory usage calculation (unintended integer division)Wladimir J. van der Laan2018-03-291-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | a16c6d2 Fix error in memory usage calculation (unintended integer division) (practicalswift) Pull request description: Fix bug in memory usage calculation (unintended integer division). Tree-SHA512: 2df1f00c5282581c61e1fd55fef3fabc02161b5a47d8f1795b05d57117245ff3d1ee861dd689eebe0185f28176cea428007e799d5c43a1ce5dc704123439f967
| * | Fix error in memory usage calculation (unintended integer division)practicalswift2018-03-271-2/+2
| | |
* | | Increase LevelDB max_open_files unless on 32-bit Unix.Evan Klitzke2018-03-281-1/+26
|/ / | | | | | | | | | | | | | | This change significantly increases IBD performance by increasing the amount of the UTXO index that can remain in memory. To ensure this doesn't cause problems in the future, a static_assert on the LevelDB version has been added, which must be updated by anyone upgrading LevelDB.
* | Log fatal LevelDB errors more verboselyEvan Klitzke2018-03-091-8/+4
| |
* | Add DynamicMemoryUsage() to LevelDBEvan Klitzke2018-03-061-0/+20
|/ | | | | | This adds a DynamicMemoryUsage() method similar to the existing methods of the same name, and adds logging of memory usage to CDBWrapper::WriteBatch.
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* Merge #10574: Remove includes in .cpp files for things the corresponding .h ↵Wladimir J. van der Laan2017-12-121-2/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file already included a720b92 Remove includes in .cpp files for things the corresponding .h file already included (practicalswift) Pull request description: Remove includes in .cpp files for things the corresponding .h file already included. Example case: * `addrdb.cpp` includes `addrdb.h` and `fs.h` * `addrdb.h` includes `fs.h` Then remove the direct inclusion of `fs.h` in `addrman.cpp` and rely on the indirect inclusion of `fs.h` via the included `addrdb.h`. In line with the header include guideline (see #10575). Tree-SHA512: 8704b9de3011a4c234db336a39f7d2c139e741cf0f7aef08a5d3e05197e1e18286b863fdab25ae9638af4ff86b3d52e5cab9eed66bfa2476063aa5c79f9b0346
| * Remove includes in .cpp files for things the corresponding .h file already ↵practicalswift2017-11-161-2/+0
| | | | | | | | included
* | Prefix leveldb debug loggingWladimir J. van der Laan2017-11-301-1/+1
|/ | | | | | | | | | | | | | | | | Add leveldb: prefix to leveldb debug logging lines. leveldb debug messages come in various scary flavors such as: 2017-11-30 08:26:31 leveldb: Recovering log #26 2017-11-30 08:26:31 leveldb: Level-0 table #28: started 2017-11-30 08:26:31 leveldb: Level-0 table #28: 597 bytes OK 2017-11-30 08:26:31 leveldb: Delete type=0 #26 2017-11-30 08:26:31 leveldb: Delete type=3 #24 so it's reasonably important to mark them as coming from leveldb internals and not from consensus validation wallet or such. (this only affects `-debug=leveldb` or `-debug=1` otherwise you won't see them in the first place)
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Merge #10701: Remove the virtual specifier for functions with the override ↵MarcoFalke2017-09-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | specifier 1bcd44223 Remove the virtual specifier for functions with the override specifier (practicalswift) Pull request description: Remove the `virtual` specifier for functions with the `override` specifier. `override` implies that the function is virtual (in addition - of course - to guaranteeing that the function is overriding a virtual function from a base class). Tree-SHA512: 2e83e1b3651f55f8f2645282114ab087ad3a0be8826f26ee5c2064d0952f677290b97261398c1d524ec7f87bbbfdbeefc141180f6099c8bbfa4c59a14f7fa755
| * Remove the virtual specifier for functions with the override specifierpracticalswift2017-08-091-1/+1
| | | | | | | | | | | | `override` guarantees that the function is virtual (in addition to that the function is overriding a virtual function from a base class).
* | Merge #9964: Add const to methods that do not modify the object for which it ↵MarcoFalke2017-08-161-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | is called 6e8c48dc5 Add const to methods that do not modify the object for which it is called (practicalswift) Pull request description: Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
| * | Add const to methods that do not modify the object for which it is calledpracticalswift2017-07-251-1/+1
| | |
* | | scripted-diff: stop using the gArgs wrappersMarko Bencun2017-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | They were temporary additions to ease the transition. -BEGIN VERIFY SCRIPT- find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g' -END VERIFY SCRIPT-
* | | scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift2017-08-071-6/+6
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-
* | Add undocumented -forcecompactdb to force LevelDB compactionsPieter Wuille2017-08-031-0/+6
|/
* Merge #9544: [trivial] Add end of namespace comments. Improve consistency.Wladimir J. van der Laan2017-06-261-1/+1
|\ | | | | | | | | | | 5a9b508 [trivial] Add end of namespace comments (practicalswift) Tree-SHA512: 92b0fcae4d1d3f4da9e97569ae84ef2d6e09625a5815cd0e5f0eb6dd2ecba9852fa85c184c5ae9de5117050330ce995e9867b451fa8cd5512169025990541a2b
| * [trivial] Add end of namespace commentspracticalswift2017-05-311-1/+1
| |
* | 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.
* Replace uses of boost::filesystem with fsWladimir J. van der Laan2017-04-031-1/+1
| | | | | | | | | 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-2/+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-1/+2
| | | | | | | | | | | | | | | | | 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.
* [LevelDB] Plug leveldb logs to bitcoin logsNicolasDorier2017-03-161-0/+61
|
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* C++11: s/boost::scoped_ptr/std::unique_ptr/Jorge Timón2016-09-011-1/+1
|
* dbwrapper: Move `HandleError` to `dbwrapper_private`Wladimir J. van der Laan2016-04-231-17/+17
| | | | HandleError is implementation-specific.
* dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIteratorWladimir J. van der Laan2016-04-231-5/+9
| | | | | | | | | Pass parent wrapper directly instead of obfuscation key. This makes it possible for other databases which re-use this code to use other properties from the database. Add a namespace dbwrapper_private for private functions to be used only in dbwrapper.h/cpp and dbwrapper_tests.
* dbwrapper: Remove CDBWrapper::GetObfuscateKeyHexWladimir J. van der Laan2016-04-231-7/+2
| | | | | | It is an unnecessary method as it is used only two times and only internally, and the whole implementation is HexStr(obfuscate_key).
* dbwrapper: Remove throw keywords in function signaturesWladimir J. van der Laan2016-04-231-2/+2
| | | | | | | | Using throw() specifications in function signatures is not only not required in C++, it is considered deprecated for [various reasons](https://stackoverflow.com/questions/1055387/throw-keyword-in-functions-signature). It is not implemented by any of the common C++ compilers. The usage is also inconsistent with the rest of the source code.
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* leveldbwrapper file rename to dbwrapper.*Jeff Garzik2015-10-221-0/+152