mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-04 04:31:41 +00:00
Merge bitcoin/bitcoin#25645: refactor: Remove unused includes from dbwrapper.h
faf98aecf876fae0ec6d4d16b7e66f3a35253180 Remove unused includes in rpc/fees.cpp (MacroFake)
1111ddeedf7ea801507db4e23b4737ec183eb19c Remove unused includes from dbwrapper.h (MacroFake)
fa77fdd0475fa15a1a3641c5d5a2bf7ad095aa84 Add missing includes (MacroFake)
fa869ce2c2b906d8b087c4e7a5f1804a74b1c522 Add missing includes to node/chainstate (MacroFake)
Pull request description:
Unused includes are confusing, but also cause unrelated compile errors when the unused includes were to be removed.
Fix that by adding the missing includes where they are needed and then remove them where they are not needed. This is also checked by iwyu.
ACKs for top commit:
hebasto:
ACK faf98aecf876fae0ec6d4d16b7e66f3a35253180, I have reviewed the code and it looks OK, I agree it can be merged.
jarolrod:
Code Review ACK faf98aecf8
Tree-SHA512: 75f3c6e6f6ecf8a98233e1a1463c75ca4e0eb3ec341150d274141072fe95413a3c2ec6386d1c527899cc63d43f63f5eb5991509847412773362808ddfb1bb435
This commit is contained in:
commit
5560682a44
@ -40,8 +40,10 @@ if [ "${RUN_TIDY}" = "true" ]; then
|
||||
export P_CI_DIR="${BASE_BUILD_DIR}/bitcoin-$HOST/"
|
||||
CI_EXEC "python3 ${DIR_IWYU}/include-what-you-use/iwyu_tool.py"\
|
||||
" src/compat"\
|
||||
" src/dbwrapper.cpp"\
|
||||
" src/init"\
|
||||
" src/kernel/mempool_persist.cpp"\
|
||||
" src/node/chainstate.cpp"\
|
||||
" src/policy/feerate.cpp"\
|
||||
" src/policy/packages.cpp"\
|
||||
" src/policy/settings.cpp"\
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#include <chainparams.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <streams.h>
|
||||
#include <util/system.h>
|
||||
#include <validation.h>
|
||||
|
||||
// These are the two major time-sinks which happen after we have fully received
|
||||
|
||||
@ -4,15 +4,28 @@
|
||||
|
||||
#include <dbwrapper.h>
|
||||
|
||||
#include <memory>
|
||||
#include <fs.h>
|
||||
#include <logging.h>
|
||||
#include <random.h>
|
||||
#include <tinyformat.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdarg>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <leveldb/cache.h>
|
||||
#include <leveldb/db.h>
|
||||
#include <leveldb/env.h>
|
||||
#include <leveldb/filter_policy.h>
|
||||
#include <leveldb/helpers/memenv/memenv.h>
|
||||
#include <stdint.h>
|
||||
#include <algorithm>
|
||||
#include <leveldb/iterator.h>
|
||||
#include <leveldb/options.h>
|
||||
#include <leveldb/status.h>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class CBitcoinLevelDBLogger : public leveldb::Logger {
|
||||
public:
|
||||
|
||||
@ -7,14 +7,26 @@
|
||||
|
||||
#include <clientversion.h>
|
||||
#include <fs.h>
|
||||
#include <logging.h>
|
||||
#include <serialize.h>
|
||||
#include <span.h>
|
||||
#include <streams.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <exception>
|
||||
#include <leveldb/db.h>
|
||||
#include <leveldb/iterator.h>
|
||||
#include <leveldb/options.h>
|
||||
#include <leveldb/slice.h>
|
||||
#include <leveldb/status.h>
|
||||
#include <leveldb/write_batch.h>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
namespace leveldb {
|
||||
class Env;
|
||||
}
|
||||
|
||||
static const size_t DBWRAPPER_PREALLOC_KEY_SIZE = 64;
|
||||
static const size_t DBWRAPPER_PREALLOC_VALUE_SIZE = 1024;
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include <shutdown.h>
|
||||
#include <tinyformat.h>
|
||||
#include <util/syscall_sandbox.h>
|
||||
#include <util/system.h>
|
||||
#include <util/thread.h>
|
||||
#include <util/translation.h>
|
||||
#include <validation.h> // For g_chainman
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
#include <serialize.h>
|
||||
#include <txdb.h>
|
||||
#include <undo.h>
|
||||
#include <util/system.h>
|
||||
#include <validation.h>
|
||||
|
||||
using kernel::CCoinsStats;
|
||||
|
||||
@ -4,10 +4,23 @@
|
||||
|
||||
#include <node/chainstate.h>
|
||||
|
||||
#include <chain.h>
|
||||
#include <coins.h>
|
||||
#include <consensus/params.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <sync.h>
|
||||
#include <threadsafety.h>
|
||||
#include <txdb.h>
|
||||
#include <uint256.h>
|
||||
#include <util/time.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <cassert>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace node {
|
||||
std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
|
||||
ChainstateManager& chainman,
|
||||
|
||||
@ -11,9 +11,6 @@
|
||||
|
||||
class ChainstateManager;
|
||||
class CTxMemPool;
|
||||
namespace Consensus {
|
||||
struct Params;
|
||||
} // namespace Consensus
|
||||
|
||||
namespace node {
|
||||
enum class ChainstateLoadingError {
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
#include <validation.h> // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
|
||||
#include <netbase.h>
|
||||
#include <txdb.h> // for -dbcache defaults
|
||||
#include <util/system.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
|
||||
@ -39,6 +39,7 @@
|
||||
#include <univalue.h>
|
||||
#include <util/check.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
#include <util/translation.h>
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
@ -6,7 +6,6 @@
|
||||
#include <core_io.h>
|
||||
#include <policy/feerate.h>
|
||||
#include <policy/fees.h>
|
||||
#include <policy/policy.h>
|
||||
#include <policy/settings.h>
|
||||
#include <rpc/protocol.h>
|
||||
#include <rpc/request.h>
|
||||
@ -16,7 +15,6 @@
|
||||
#include <txmempool.h>
|
||||
#include <univalue.h>
|
||||
#include <util/fees.h>
|
||||
#include <util/system.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
#include <txmempool.h>
|
||||
#include <univalue.h>
|
||||
#include <util/moneystr.h>
|
||||
#include <util/time.h>
|
||||
|
||||
using kernel::DumpMempool;
|
||||
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
|
||||
#include <coins.h>
|
||||
#include <dbwrapper.h>
|
||||
#include <sync.h>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user