mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge bitcoin/bitcoin#28186: kernel: Prune leveldb headers
d8f1222ac5refactor: Correct dbwrapper key naming (TheCharlatan)be8f159ac5build: Remove leveldb from BITCOIN_INCLUDES (TheCharlatan)c95b37d641refactor: Move CDBWrapper leveldb members to their own context struct (TheCharlatan)c534a615e9refactor: Split dbwrapper CDBWrapper::EstimateSize implementation (TheCharlatan)586448888brefactor: Move HandleError to dbwrapper implementation (TheCharlatan)dede0eef7arefactor: Split dbwrapper CDBWrapper::Exists implementation (TheCharlatan)a5c2eb5748refactor: Fix logging.h includes (TheCharlatan)84058e0eedrefactor: Split dbwrapper CDBWrapper::Read implementation (TheCharlatan)e4af2408f2refactor: Pimpl leveldb::Iterator for CDBIterator (TheCharlatan)ef941ff128refactor: Split dbwrapper CDBIterator::GetValue implementation (TheCharlatan)b7a1ab5cb4refactor: Split dbwrapper CDBIterator::GetKey implementation (TheCharlatan)d7437908cdrefactor: Split dbwrapper CDBIterator::Seek implementation (TheCharlatan)ea8135de7erefactor: Pimpl leveldb::batch for CDBBatch (TheCharlatan)b9870c920drefactor: Split dbwrapper CDBatch::Erase implementation (TheCharlatan)532ee812a4refactor: Split dbwrapper CDBBatch::Write implementation (TheCharlatan)afc534df9arefactor: 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](https://github.com/bitcoin/bitcoin/issues/27587), and more specifically its stage 1 step 3 "Decouple most non-consensus headers from libbitcoinkernel". ACKs for top commit: stickies-v: re-ACKd8f1222ac5MarcoFalke: ACKd8f1222ac5🔠 Tree-SHA512: 0f58309be165af0162e648233451cd80fda88726fc10c0da7bfe4ec2ffa9afe63fbf7ffae9493698d3f39653b4ad870c372eee652ecc90ab1c29d86c387070f3
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/init.h>
|
||||
#include <interfaces/node.h>
|
||||
#include <logging.h>
|
||||
#include <mapport.h>
|
||||
#include <net.h>
|
||||
#include <net_permissions.h>
|
||||
|
||||
Reference in New Issue
Block a user