mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +01:00
refactor: Fix includes in index directory
This commit is contained in:
@@ -8,4 +8,9 @@
|
||||
# libc symbols.
|
||||
{ "symbol": ["AT_HWCAP", "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"] },
|
||||
]
|
||||
|
||||
@@ -2,10 +2,13 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <chainparams.h>
|
||||
#include <common/args.h>
|
||||
#include <index/base.h>
|
||||
|
||||
#include <chain.h>
|
||||
#include <common/args.h>
|
||||
#include <dbwrapper.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/types.h>
|
||||
#include <kernel/chain.h>
|
||||
#include <logging.h>
|
||||
#include <node/abort.h>
|
||||
@@ -13,20 +16,31 @@
|
||||
#include <node/context.h>
|
||||
#include <node/database_args.h>
|
||||
#include <node/interface_ui.h>
|
||||
#include <primitives/block.h>
|
||||
#include <sync.h>
|
||||
#include <tinyformat.h>
|
||||
#include <uint256.h>
|
||||
#include <undo.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/string.h>
|
||||
#include <util/thread.h>
|
||||
#include <util/threadinterrupt.h>
|
||||
#include <util/time.h>
|
||||
#include <util/translation.h>
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
#include <chrono>
|
||||
#include <cassert>
|
||||
#include <compare>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <span>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
constexpr uint8_t DB_BEST_BLOCK{'B'};
|
||||
|
||||
|
||||
@@ -5,29 +5,41 @@
|
||||
#ifndef BITCOIN_INDEX_BASE_H
|
||||
#define BITCOIN_INDEX_BASE_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <dbwrapper.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/types.h>
|
||||
#include <util/string.h>
|
||||
#include <kernel/cs_main.h>
|
||||
#include <threadsafety.h>
|
||||
#include <uint256.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/threadinterrupt.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
||||
class CBlock;
|
||||
class CBlockIndex;
|
||||
class Chainstate;
|
||||
class ChainstateManager;
|
||||
namespace interfaces {
|
||||
class Chain;
|
||||
} // namespace interfaces
|
||||
|
||||
struct CBlockLocator;
|
||||
struct IndexSummary {
|
||||
std::string name;
|
||||
bool synced{false};
|
||||
int best_block_height{0};
|
||||
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
|
||||
|
||||
@@ -2,19 +2,39 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// 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 <dbwrapper.h>
|
||||
#include <flatfile.h>
|
||||
#include <hash.h>
|
||||
#include <index/blockfilterindex.h>
|
||||
#include <index/base.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <interfaces/types.h>
|
||||
#include <logging.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <undo.h>
|
||||
#include <util/fs_helpers.h>
|
||||
#include <serialize.h>
|
||||
#include <streams.h>
|
||||
#include <sync.h>
|
||||
#include <uint256.h>
|
||||
#include <util/check.h>
|
||||
#include <util/fs.h>
|
||||
#include <util/hasher.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,
|
||||
* 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
|
||||
|
||||
@@ -6,13 +6,24 @@
|
||||
#define BITCOIN_INDEX_BLOCKFILTERINDEX_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <blockfilter.h>
|
||||
#include <chain.h>
|
||||
#include <flatfile.h>
|
||||
#include <index/base.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <sync.h>
|
||||
#include <uint256.h>
|
||||
#include <util/hasher.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
class BlockFilter;
|
||||
class CBlockIndex;
|
||||
enum class BlockFilterType : uint8_t;
|
||||
|
||||
static const char* const DEFAULT_BLOCKFILTERINDEX = "0";
|
||||
|
||||
|
||||
@@ -2,20 +2,39 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <index/coinstatsindex.h>
|
||||
|
||||
#include <arith_uint256.h>
|
||||
#include <chain.h>
|
||||
#include <chainparams.h>
|
||||
#include <coins.h>
|
||||
#include <common/args.h>
|
||||
#include <consensus/amount.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 <logging.h>
|
||||
#include <node/blockstorage.h>
|
||||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <script/script.h>
|
||||
#include <serialize.h>
|
||||
#include <txdb.h>
|
||||
#include <uint256.h>
|
||||
#include <undo.h>
|
||||
#include <util/check.h>
|
||||
#include <util/fs.h>
|
||||
#include <validation.h>
|
||||
|
||||
#include <compare>
|
||||
#include <ios>
|
||||
#include <limits>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
using kernel::ApplyCoinHash;
|
||||
using kernel::CCoinsStats;
|
||||
using kernel::GetBogoSize;
|
||||
|
||||
@@ -6,11 +6,18 @@
|
||||
#define BITCOIN_INDEX_COINSTATSINDEX_H
|
||||
|
||||
#include <arith_uint256.h>
|
||||
#include <consensus/amount.h>
|
||||
#include <crypto/muhash.h>
|
||||
#include <index/base.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <uint256.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
class CBlockIndex;
|
||||
class CDBBatch;
|
||||
namespace kernel {
|
||||
struct CCoinsStats;
|
||||
}
|
||||
|
||||
@@ -4,14 +4,32 @@
|
||||
|
||||
#include <index/txindex.h>
|
||||
|
||||
#include <clientversion.h>
|
||||
#include <common/args.h>
|
||||
#include <dbwrapper.h>
|
||||
#include <flatfile.h>
|
||||
#include <index/base.h>
|
||||
#include <index/disktxpos.h>
|
||||
#include <interfaces/chain.h>
|
||||
#include <logging.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 <cassert>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <exception>
|
||||
#include <iterator>
|
||||
#include <span>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
constexpr uint8_t DB_TXINDEX{'t'};
|
||||
|
||||
std::unique_ptr<TxIndex> g_txindex;
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
#define BITCOIN_INDEX_TXINDEX_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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user