Skip to content

Commit

Permalink
Remove version.h include from primitive headers
Browse files Browse the repository at this point in the history
Use where actually needed instead.
  • Loading branch information
theuni committed Nov 14, 2023
1 parent a0c254c commit 3762e58
Show file tree
Hide file tree
Showing 26 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/bench/checkblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <streams.h>
#include <util/chaintype.h>
#include <validation.h>
#include <version.h>

// These are the two major time-sinks which happen after we have fully received
// a block off the wire, but before we can relay the block on to peers using
Expand Down
1 change: 1 addition & 0 deletions src/bench/rpc_blockchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <test/util/setup_common.h>
#include <util/chaintype.h>
#include <validation.h>
#include <version.h>

#include <univalue.h>

Expand Down
1 change: 1 addition & 0 deletions src/bench/verify_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <script/interpreter.h>
#include <streams.h>
#include <test/util/transaction_utils.h>
#include <version.h>

#include <array>

Expand Down
1 change: 1 addition & 0 deletions src/blockencodings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <streams.h>
#include <txmempool.h>
#include <validation.h>
#include <version.h>

#include <unordered_map>

Expand Down
1 change: 0 additions & 1 deletion src/consensus/validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#define BITCOIN_CONSENSUS_VALIDATION_H

#include <string>
#include <version.h>
#include <consensus/consensus.h>
#include <primitives/transaction.h>
#include <primitives/block.h>
Expand Down
1 change: 1 addition & 0 deletions src/external_signer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <psbt.h>
#include <util/strencodings.h>
#include <external_signer.h>
#include <version.h>

#include <algorithm>
#include <stdexcept>
Expand Down
1 change: 0 additions & 1 deletion src/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <serialize.h>
#include <span.h>
#include <uint256.h>
#include <version.h>

#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/net.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <util/check.h>
#include <util/sock.h>
#include <util/threadinterrupt.h>
#include <version.h>

#include <atomic>
#include <condition_variable>
Expand Down
1 change: 0 additions & 1 deletion src/primitives/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <uint256.h>
#include <util/strencodings.h>
#include <util/transaction_identifier.h>
#include <version.h>

#include <cassert>
#include <stdexcept>
Expand Down
1 change: 1 addition & 0 deletions src/psbt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <script/signingprovider.h>
#include <util/check.h>
#include <util/strencodings.h>
#include <version.h>


PartiallySignedTransaction::PartiallySignedTransaction(const CMutableTransaction& tx) : tx(tx)
Expand Down
1 change: 1 addition & 0 deletions src/qt/psbtoperationsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <qt/optionsmodel.h>
#include <util/fs.h>
#include <util/strencodings.h>
#include <version.h>

#include <fstream>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions src/qt/sendcoinsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <policy/fees.h>
#include <txmempool.h>
#include <validation.h>
#include <version.h>
#include <wallet/coincontrol.h>
#include <wallet/fees.h>
#include <wallet/wallet.h>
Expand Down
1 change: 1 addition & 0 deletions src/qt/walletmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <node/interface_ui.h>
#include <psbt.h>
#include <util/translation.h>
#include <version.h>
#include <wallet/coincontrol.h>
#include <wallet/wallet.h> // for CRecipient

Expand Down
1 change: 1 addition & 0 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <util/vector.h>
#include <validation.h>
#include <validationinterface.h>
#include <version.h>

#include <numeric>
#include <stdint.h>
Expand Down
1 change: 1 addition & 0 deletions src/script/interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <pubkey.h>
#include <script/script.h>
#include <uint256.h>
#include <version.h>

typedef std::vector<unsigned char> valtype;

Expand Down
1 change: 1 addition & 0 deletions src/script/sign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <uint256.h>
#include <util/translation.h>
#include <util/vector.h>
#include <version.h>

typedef std::vector<unsigned char> valtype;

Expand Down
1 change: 1 addition & 0 deletions src/signet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <streams.h>
#include <uint256.h>
#include <util/strencodings.h>
#include <version.h>

static constexpr uint8_t SIGNET_HEADER[4] = {0xec, 0xc7, 0xda, 0xa2};

Expand Down
1 change: 1 addition & 0 deletions src/test/blockencodings_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <test/util/txmempool.h>

#include <test/util/setup_common.h>
#include <version.h>

#include <boost/test/unit_test.hpp>

Expand Down
1 change: 1 addition & 0 deletions src/test/bloom_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <test/util/setup_common.h>
#include <uint256.h>
#include <util/strencodings.h>
#include <version.h>

#include <vector>

Expand Down
1 change: 1 addition & 0 deletions src/test/miniscript_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <script/miniscript.h>
#include <script/script_error.h>
#include <script/signingprovider.h>
#include <version.h>

namespace {

Expand Down
1 change: 1 addition & 0 deletions src/test/script_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <test/util/transaction_utils.h>
#include <util/fs.h>
#include <util/strencodings.h>
#include <version.h>

#if defined(HAVE_CONSENSUS_LIB)
#include <script/bitcoinconsensus.h>
Expand Down
1 change: 1 addition & 0 deletions src/test/streams_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <test/util/setup_common.h>
#include <util/fs.h>
#include <util/strencodings.h>
#include <version.h>

#include <boost/test/unit_test.hpp>

Expand Down
1 change: 0 additions & 1 deletion src/undo.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <consensus/consensus.h>
#include <primitives/transaction.h>
#include <serialize.h>
#include <version.h>

/** Formatter for undo information for a CTxIn
*
Expand Down
1 change: 1 addition & 0 deletions src/wallet/rpc/spend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <util/rbf.h>
#include <util/translation.h>
#include <util/vector.h>
#include <version.h>
#include <wallet/coincontrol.h>
#include <wallet/feebumper.h>
#include <wallet/fees.h>
Expand Down
1 change: 1 addition & 0 deletions src/wallet/spend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <util/rbf.h>
#include <util/trace.h>
#include <util/translation.h>
#include <version.h>
#include <wallet/coincontrol.h>
#include <wallet/fees.h>
#include <wallet/receive.h>
Expand Down
1 change: 1 addition & 0 deletions src/wallet/test/psbt_wallet_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <key_io.h>
#include <util/bip32.h>
#include <util/strencodings.h>
#include <version.h>
#include <wallet/wallet.h>

#include <boost/test/unit_test.hpp>
Expand Down

0 comments on commit 3762e58

Please sign in to comment.