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
src/node/
The src/node/ directory contains code that needs to access node state
(state in CChain, CBlockIndex, CCoinsView, CTxMemPool, and similar
classes).
Code in src/node/ is meant to be segregated from code in
src/wallet/ and src/qt/, to ensure wallet and GUI
code changes don't interfere with node operation, to allow wallet and GUI code
to run in separate processes, and to perhaps eventually allow wallet and GUI
code to be maintained in separate source repositories.
As a rule of thumb, code in one of the src/node/,
src/wallet/, or src/qt/ directories should avoid
calling code in the other directories directly, and only invoke it indirectly
through the more limited src/interfaces/ classes.
This directory is at the moment
sparsely populated. Eventually more substantial files like
src/validation.cpp and
src/txmempool.cpp might be moved there.