refactor: Fix includes in index directory

This commit is contained in:
Hennadii Stepanov committed 2025-09-09 12:34:30 +01:00
1 parent bdb8eadcdc
commit 57a3eac387
9 files changed
+138 -23

No files matched your search

+5
View File
@@ -8,4 +8,9 @@
# libc symbols. # libc symbols.
{ "symbol": ["AT_HWCAP", "private", "<sys/auxv.h>", "public"] }, { "symbol": ["AT_HWCAP", "private", "<sys/auxv.h>", "public"] },
{ "symbol": ["AT_HWCAP2", "private", "<sys/auxv.h>", "public"] }, { "symbol": ["AT_HWCAP2", "private", "<sys/auxv.h>", "public"] },
# Fixed in https://github.com/include-what-you-use/include-what-you-use/pull/1706.
{ "symbol": ["SEEK_CUR", "private", "<cstdio>", "public"] },
{ "symbol": ["SEEK_END", "private", "<cstdio>", "public"] },
{ "symbol": ["SEEK_SET", "private", "<cstdio>", "public"] },
] ]
+17 -3
View File
@@ -2,10 +2,13 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <chainparams.h>
#include <common/args.h>
#include <index/base.h> #include <index/base.h>
#include <chain.h>
#include <common/args.h>
#include <dbwrapper.h>
#include <interfaces/chain.h> #include <interfaces/chain.h>
#include <interfaces/types.h>
#include <kernel/chain.h> #include <kernel/chain.h>
#include <logging.h> #include <logging.h>
#include <node/abort.h> #include <node/abort.h>
@@ -13,20 +16,31 @@
#include <node/context.h> #include <node/context.h>
#include <node/database_args.h> #include <node/database_args.h>
#include <node/interface_ui.h> #include <node/interface_ui.h>
#include <primitives/block.h>
#include <sync.h>
#include <tinyformat.h> #include <tinyformat.h>
#include <uint256.h>
#include <undo.h> #include <undo.h>
#include <util/fs.h>
#include <util/string.h> #include <util/string.h>
#include <util/thread.h> #include <util/thread.h>
#include <util/threadinterrupt.h>
#include <util/time.h>
#include <util/translation.h> #include <util/translation.h>
#include <validation.h> #include <validation.h>
#include <validationinterface.h>
#include <chrono> #include <cassert>
#include <compare>
#include <cstdint>
#include <memory> #include <memory>
#include <optional> #include <optional>
#include <span>
#include <stdexcept> #include <stdexcept>
#include <string> #include <string>
#include <thread> #include <thread>
#include <utility> #include <utility>
#include <vector>
constexpr uint8_t DB_BEST_BLOCK{'B'}; constexpr uint8_t DB_BEST_BLOCK{'B'};
+18 -6
View File
@@ -5,29 +5,41 @@
#ifndef BITCOIN_INDEX_BASE_H #ifndef BITCOIN_INDEX_BASE_H
#define BITCOIN_INDEX_BASE_H #define BITCOIN_INDEX_BASE_H
#include <attributes.h>
#include <dbwrapper.h> #include <dbwrapper.h>
#include <interfaces/chain.h> #include <interfaces/chain.h>
#include <interfaces/types.h> #include <kernel/cs_main.h>
#include <util/string.h> #include <threadsafety.h>
#include <uint256.h>
#include <util/fs.h>
#include <util/threadinterrupt.h> #include <util/threadinterrupt.h>
#include <validationinterface.h> #include <validationinterface.h>
#include <atomic>
#include <cstddef>
#include <memory>
#include <optional>
#include <string> #include <string>
#include <thread>
class CBlock; class CBlock;
class CBlockIndex; class CBlockIndex;
class Chainstate; class Chainstate;
class ChainstateManager;
namespace interfaces {
class Chain;
} // namespace interfaces
struct CBlockLocator;
struct IndexSummary { struct IndexSummary {
std::string name; std::string name;
bool synced{false}; bool synced{false};
int best_block_height{0}; int best_block_height{0};
uint256 best_block_hash; uint256 best_block_hash;
}; };
namespace interfaces {
struct BlockRef;
}
namespace util {
template <unsigned int num_params>
struct ConstevalFormatString;
}
/** /**
* Base class for indices of blockchain data. This implements * Base class for indices of blockchain data. This implements
+26 -6
View File
@@ -2,19 +2,39 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <map> #include <index/blockfilterindex.h>
#include <clientversion.h> #include <blockfilter.h>
#include <chain.h>
#include <common/args.h> #include <common/args.h>
#include <dbwrapper.h> #include <dbwrapper.h>
#include <flatfile.h>
#include <hash.h> #include <hash.h>
#include <index/blockfilterindex.h> #include <index/base.h>
#include <interfaces/chain.h>
#include <interfaces/types.h>
#include <logging.h> #include <logging.h>
#include <node/blockstorage.h> #include <serialize.h>
#include <undo.h> #include <streams.h>
#include <util/fs_helpers.h> #include <sync.h>
#include <uint256.h>
#include <util/check.h>
#include <util/fs.h>
#include <util/hasher.h>
#include <util/syserror.h> #include <util/syserror.h>
#include <cerrno>
#include <exception>
#include <ios>
#include <map>
#include <optional>
#include <span>
#include <stdexcept>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
/* The index database stores three items for each block: the disk location of the encoded filter, /* The index database stores three items for each block: the disk location of the encoded filter,
* its dSHA256 hash, and the header. Those belonging to blocks on the active chain are indexed by * its dSHA256 hash, and the header. Those belonging to blocks on the active chain are indexed by
* height, and those belonging to blocks that have been reorganized out of the active chain are * height, and those belonging to blocks that have been reorganized out of the active chain are
+13 -2
View File
@@ -6,13 +6,24 @@
#define BITCOIN_INDEX_BLOCKFILTERINDEX_H #define BITCOIN_INDEX_BLOCKFILTERINDEX_H
#include <attributes.h> #include <attributes.h>
#include <blockfilter.h>
#include <chain.h>
#include <flatfile.h> #include <flatfile.h>
#include <index/base.h> #include <index/base.h>
#include <interfaces/chain.h>
#include <sync.h>
#include <uint256.h>
#include <util/hasher.h> #include <util/hasher.h>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <unordered_map> #include <unordered_map>
#include <vector>
class BlockFilter;
class CBlockIndex;
enum class BlockFilterType : uint8_t;
static const char* const DEFAULT_BLOCKFILTERINDEX = "0"; static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
+22 -3
View File
@@ -2,20 +2,39 @@
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <index/coinstatsindex.h>
#include <arith_uint256.h> #include <arith_uint256.h>
#include <chain.h>
#include <chainparams.h> #include <chainparams.h>
#include <coins.h> #include <coins.h>
#include <common/args.h> #include <common/args.h>
#include <consensus/amount.h>
#include <crypto/muhash.h> #include <crypto/muhash.h>
#include <index/coinstatsindex.h> #include <dbwrapper.h>
#include <index/base.h>
#include <interfaces/chain.h>
#include <interfaces/types.h>
#include <kernel/coinstats.h> #include <kernel/coinstats.h>
#include <logging.h> #include <logging.h>
#include <node/blockstorage.h> #include <primitives/block.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <serialize.h> #include <serialize.h>
#include <txdb.h> #include <uint256.h>
#include <undo.h> #include <undo.h>
#include <util/check.h>
#include <util/fs.h>
#include <validation.h> #include <validation.h>
#include <compare>
#include <ios>
#include <limits>
#include <span>
#include <string>
#include <utility>
#include <vector>
using kernel::ApplyCoinHash; using kernel::ApplyCoinHash;
using kernel::CCoinsStats; using kernel::CCoinsStats;
using kernel::GetBogoSize; using kernel::GetBogoSize;
+8 -1
View File
@@ -6,11 +6,18 @@
#define BITCOIN_INDEX_COINSTATSINDEX_H #define BITCOIN_INDEX_COINSTATSINDEX_H
#include <arith_uint256.h> #include <arith_uint256.h>
#include <consensus/amount.h>
#include <crypto/muhash.h> #include <crypto/muhash.h>
#include <index/base.h> #include <index/base.h>
#include <interfaces/chain.h>
#include <uint256.h>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
class CBlockIndex; class CBlockIndex;
class CDBBatch;
namespace kernel { namespace kernel {
struct CCoinsStats; struct CCoinsStats;
} }
+20 -2
View File
@@ -4,14 +4,32 @@
#include <index/txindex.h> #include <index/txindex.h>
#include <clientversion.h>
#include <common/args.h> #include <common/args.h>
#include <dbwrapper.h>
#include <flatfile.h>
#include <index/base.h>
#include <index/disktxpos.h> #include <index/disktxpos.h>
#include <interfaces/chain.h>
#include <logging.h> #include <logging.h>
#include <node/blockstorage.h> #include <node/blockstorage.h>
#include <primitives/transaction_identifier.h> #include <primitives/block.h>
#include <primitives/transaction.h>
#include <serialize.h>
#include <streams.h>
#include <uint256.h>
#include <util/fs.h>
#include <validation.h> #include <validation.h>
#include <cassert>
#include <cstdint>
#include <cstdio>
#include <exception>
#include <iterator>
#include <span>
#include <string>
#include <utility>
#include <vector>
constexpr uint8_t DB_TXINDEX{'t'}; constexpr uint8_t DB_TXINDEX{'t'};
std::unique_ptr<TxIndex> g_txindex; std::unique_ptr<TxIndex> g_txindex;
+9
View File
@@ -6,6 +6,15 @@
#define BITCOIN_INDEX_TXINDEX_H #define BITCOIN_INDEX_TXINDEX_H
#include <index/base.h> #include <index/base.h>
#include <primitives/transaction.h>
#include <cstddef>
#include <memory>
class uint256;
namespace interfaces {
class Chain;
}
static constexpr bool DEFAULT_TXINDEX{false}; static constexpr bool DEFAULT_TXINDEX{false};