forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin#28186: kernel: Prune leveldb headers
d8f1222 refactor: Correct dbwrapper key naming (TheCharlatan) be8f159 build: Remove leveldb from BITCOIN_INCLUDES (TheCharlatan) c95b37d refactor: Move CDBWrapper leveldb members to their own context struct (TheCharlatan) c534a61 refactor: Split dbwrapper CDBWrapper::EstimateSize implementation (TheCharlatan) 5864488 refactor: Move HandleError to dbwrapper implementation (TheCharlatan) dede0ee refactor: Split dbwrapper CDBWrapper::Exists implementation (TheCharlatan) a5c2eb5 refactor: Fix logging.h includes (TheCharlatan) 84058e0 refactor: Split dbwrapper CDBWrapper::Read implementation (TheCharlatan) e4af240 refactor: Pimpl leveldb::Iterator for CDBIterator (TheCharlatan) ef941ff refactor: Split dbwrapper CDBIterator::GetValue implementation (TheCharlatan) b7a1ab5 refactor: Split dbwrapper CDBIterator::GetKey implementation (TheCharlatan) d743790 refactor: Split dbwrapper CDBIterator::Seek implementation (TheCharlatan) ea8135d refactor: Pimpl leveldb::batch for CDBBatch (TheCharlatan) b9870c9 refactor: Split dbwrapper CDBatch::Erase implementation (TheCharlatan) 532ee81 refactor: Split dbwrapper CDBBatch::Write implementation (TheCharlatan) afc534d refactor: Wrap DestroyDB in dbwrapper helper (TheCharlatan) Pull request description: Leveldb headers are currently included in the `dbwrapper.h` file and thus available to many of Bitcoin Core's source files. However, leveldb-specific functionality should be abstracted by the `dbwrapper` and does not need to be available to the rest of the code. Having leveldb included in a widely-used header such as `dbwrapper.h` bloats the entire project's header tree. The `dbwrapper` is a key component of the libbitcoinkernel library. Future users of this library would not want to contend with having the leveldb headers exposed and potentially polluting their project's namespace. For these reasons, the leveldb headers are removed from the `dbwrapper` by moving leveldb-specific code to the implementation file and creating a [pimpl](https://en.cppreference.com/w/cpp/language/pimpl) where leveldb member variables are indispensable. As a final step, the leveldb include flags are removed from the `BITCOIN_INCLUDES` and moved to places where the dbwrapper is compiled. --- This pull request is part of the [libbitcoinkernel project](bitcoin#27587), and more specifically its stage 1 step 3 "Decouple most non-consensus headers from libbitcoinkernel". ACKs for top commit: stickies-v: re-ACK bitcoin@d8f1222 MarcoFalke: ACK d8f1222 🔠 Tree-SHA512: 0f58309be165af0162e648233451cd80fda88726fc10c0da7bfe4ec2ffa9afe63fbf7ffae9493698d3f39653b4ad870c372eee652ecc90ab1c29d86c387070f3
- Loading branch information
Showing
15 changed files
with
254 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.