diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -469,13 +469,13 @@ # More completely unrelated features shared by all executables. # Because nothing says this is different from util than "common" add_library(common - amount.cpp base58.cpp bloom.cpp cashaddr.cpp cashaddrenc.cpp chainparams.cpp config.cpp + consensus/amount.cpp consensus/merkle.cpp coins.cpp compressor.cpp diff --git a/src/avalanche/avalanche.h b/src/avalanche/avalanche.h --- a/src/avalanche/avalanche.h +++ b/src/avalanche/avalanche.h @@ -8,7 +8,7 @@ #include <cstddef> #include <memory> -#include <amount.h> +#include <consensus/amount.h> namespace avalanche { class Processor; diff --git a/src/avalanche/proof.h b/src/avalanche/proof.h --- a/src/avalanche/proof.h +++ b/src/avalanche/proof.h @@ -5,8 +5,8 @@ #ifndef BITCOIN_AVALANCHE_PROOF_H #define BITCOIN_AVALANCHE_PROOF_H -#include <amount.h> #include <avalanche/proofid.h> +#include <consensus/amount.h> #include <key.h> #include <primitives/transaction.h> #include <pubkey.h> diff --git a/src/avalanche/test/util.cpp b/src/avalanche/test/util.cpp --- a/src/avalanche/test/util.cpp +++ b/src/avalanche/test/util.cpp @@ -2,9 +2,9 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <avalanche/proofbuilder.h> #include <avalanche/test/util.h> +#include <consensus/amount.h> #include <key.h> #include <primitives/transaction.h> #include <random.h> diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -9,6 +9,7 @@ #include <chainparams.h> #include <clientversion.h> #include <coins.h> +#include <consensus/amount.h> #include <consensus/consensus.h> #include <core_io.h> #include <currencyunit.h> diff --git a/src/config.h b/src/config.h --- a/src/config.h +++ b/src/config.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_CONFIG_H #define BITCOIN_CONFIG_H -#include <amount.h> +#include <consensus/amount.h> #include <feerate.h> #include <cstdint> diff --git a/src/amount.h b/src/consensus/amount.h rename from src/amount.h rename to src/consensus/amount.h --- a/src/amount.h +++ b/src/consensus/amount.h @@ -4,8 +4,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#ifndef BITCOIN_AMOUNT_H -#define BITCOIN_AMOUNT_H +#ifndef BITCOIN_CONSENSUS_AMOUNT_H +#define BITCOIN_CONSENSUS_AMOUNT_H #include <serialize.h> @@ -172,9 +172,9 @@ * critical; in unusual circumstances like a(nother) overflow bug that allowed * for the creation of coins out of thin air modification could lead to a fork. */ -static const Amount MAX_MONEY = 21000000 * COIN; +static constexpr Amount MAX_MONEY = 21000000 * COIN; inline bool MoneyRange(const Amount nValue) { return nValue >= Amount::zero() && nValue <= MAX_MONEY; } -#endif // BITCOIN_AMOUNT_H +#endif // BITCOIN_CONSENSUS_AMOUNT_H diff --git a/src/amount.cpp b/src/consensus/amount.cpp rename from src/amount.cpp rename to src/consensus/amount.cpp --- a/src/amount.cpp +++ b/src/consensus/amount.cpp @@ -4,7 +4,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> +#include <consensus/amount.h> #include <currencyunit.h> #include <univalue.h> diff --git a/src/consensus/tx_check.cpp b/src/consensus/tx_check.cpp --- a/src/consensus/tx_check.cpp +++ b/src/consensus/tx_check.cpp @@ -3,6 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include <coins.h> +#include <consensus/amount.h> #include <consensus/consensus.h> #include <consensus/validation.h> #include <primitives/transaction.h> diff --git a/src/consensus/tx_verify.cpp b/src/consensus/tx_verify.cpp --- a/src/consensus/tx_verify.cpp +++ b/src/consensus/tx_verify.cpp @@ -4,10 +4,10 @@ #include <consensus/tx_verify.h> -#include <amount.h> #include <chain.h> #include <coins.h> #include <consensus/activation.h> +#include <consensus/amount.h> #include <consensus/consensus.h> #include <consensus/params.h> #include <consensus/validation.h> diff --git a/src/core_write.cpp b/src/core_write.cpp --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -5,6 +5,7 @@ #include <core_io.h> #include <config.h> +#include <consensus/amount.h> #include <key_io.h> #include <primitives/transaction.h> #include <script/script.h> diff --git a/src/feerate.h b/src/feerate.h --- a/src/feerate.h +++ b/src/feerate.h @@ -7,7 +7,7 @@ #ifndef BITCOIN_FEERATE_H #define BITCOIN_FEERATE_H -#include <amount.h> +#include <consensus/amount.h> #include <serialize.h> #include <cstdlib> diff --git a/src/index/coinstatsindex.cpp b/src/index/coinstatsindex.cpp --- a/src/index/coinstatsindex.cpp +++ b/src/index/coinstatsindex.cpp @@ -4,9 +4,9 @@ #include <index/coinstatsindex.h> -#include <amount.h> #include <chainparams.h> #include <coins.h> +#include <consensus/amount.h> #include <crypto/muhash.h> #include <node/blockstorage.h> #include <primitives/blockhash.h> diff --git a/src/init.cpp b/src/init.cpp --- a/src/init.cpp +++ b/src/init.cpp @@ -10,7 +10,6 @@ #include <init.h> #include <addrman.h> -#include <amount.h> #include <avalanche/avalanche.h> #include <avalanche/processor.h> #include <avalanche/proof.h> // For AVALANCHE_LEGACY_PROOF_DEFAULT @@ -22,6 +21,7 @@ #include <chainparams.h> #include <compat/sanity.h> #include <config.h> +#include <consensus/amount.h> #include <currencyunit.h> #include <flatfile.h> #include <fs.h> diff --git a/src/interfaces/node.h b/src/interfaces/node.h --- a/src/interfaces/node.h +++ b/src/interfaces/node.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_INTERFACES_NODE_H #define BITCOIN_INTERFACES_NODE_H -#include <amount.h> // For Amount +#include <consensus/amount.h> #include <net.h> // For CConnman::NumConnections #include <net_types.h> // For banmap_t #include <netaddress.h> // For Network diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_INTERFACES_WALLET_H #define BITCOIN_INTERFACES_WALLET_H -#include <amount.h> // For Amount +#include <consensus/amount.h> #include <interfaces/chain.h> // For ChainClient #include <primitives/blockhash.h> #include <primitives/transaction.h> // For CTxOut diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -4,9 +4,9 @@ #include <interfaces/wallet.h> -#include <amount.h> #include <chainparams.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/validation.h> #include <interfaces/chain.h> #include <interfaces/handler.h> diff --git a/src/miner.h b/src/miner.h --- a/src/miner.h +++ b/src/miner.h @@ -6,6 +6,7 @@ #ifndef BITCOIN_MINER_H #define BITCOIN_MINER_H +#include <consensus/amount.h> #include <primitives/block.h> #include <txmempool.h> diff --git a/src/miner.cpp b/src/miner.cpp --- a/src/miner.cpp +++ b/src/miner.cpp @@ -5,7 +5,6 @@ #include <miner.h> -#include <amount.h> #include <chain.h> #include <chainparams.h> #include <coins.h> diff --git a/src/minerfund.h b/src/minerfund.h --- a/src/minerfund.h +++ b/src/minerfund.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_MINERFUND_H #define BITCOIN_MINERFUND_H -#include <amount.h> +#include <consensus/amount.h> #include <script/standard.h> #include <vector> diff --git a/src/net.h b/src/net.h --- a/src/net.h +++ b/src/net.h @@ -9,12 +9,12 @@ #include <addrdb.h> #include <addrman.h> -#include <amount.h> #include <avalanche/proofid.h> #include <avalanche/proofradixtreeadapter.h> #include <bloom.h> #include <chainparams.h> #include <compat.h> +#include <consensus/amount.h> #include <crypto/siphash.h> #include <hash.h> #include <i2p.h> diff --git a/src/net_processing.cpp b/src/net_processing.cpp --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -19,6 +19,7 @@ #include <chain.h> #include <chainparams.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/validation.h> #include <hash.h> #include <index/blockfilterindex.h> diff --git a/src/node/coinstats.h b/src/node/coinstats.h --- a/src/node/coinstats.h +++ b/src/node/coinstats.h @@ -6,9 +6,9 @@ #ifndef BITCOIN_NODE_COINSTATS_H #define BITCOIN_NODE_COINSTATS_H -#include <amount.h> #include <chain.h> #include <coins.h> +#include <consensus/amount.h> #include <primitives/blockhash.h> #include <streams.h> #include <uint256.h> diff --git a/src/node/psbt.cpp b/src/node/psbt.cpp --- a/src/node/psbt.cpp +++ b/src/node/psbt.cpp @@ -2,8 +2,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <coins.h> +#include <consensus/amount.h> #include <consensus/tx_verify.h> #include <node/psbt.h> #include <policy/policy.h> diff --git a/src/policy/fees.h b/src/policy/fees.h --- a/src/policy/fees.h +++ b/src/policy/fees.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_POLICY_FEES_H #define BITCOIN_POLICY_FEES_H -#include <amount.h> +#include <consensus/amount.h> #include <random.h> #include <uint256.h> diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -7,7 +7,7 @@ #ifndef BITCOIN_PRIMITIVES_TRANSACTION_H #define BITCOIN_PRIMITIVES_TRANSACTION_H -#include <amount.h> +#include <consensus/amount.h> #include <feerate.h> #include <primitives/txid.h> #include <script/script.h> diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp --- a/src/primitives/transaction.cpp +++ b/src/primitives/transaction.cpp @@ -5,6 +5,7 @@ #include <primitives/transaction.h> +#include <consensus/amount.h> #include <hash.h> #include <tinyformat.h> #include <util/strencodings.h> diff --git a/src/qt/bitcoinamountfield.h b/src/qt/bitcoinamountfield.h --- a/src/qt/bitcoinamountfield.h +++ b/src/qt/bitcoinamountfield.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_QT_BITCOINAMOUNTFIELD_H #define BITCOIN_QT_BITCOINAMOUNTFIELD_H -#include <amount.h> +#include <consensus/amount.h> #include <QWidget> diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -11,7 +11,7 @@ #include <qt/optionsdialog.h> -#include <amount.h> +#include <consensus/amount.h> #include <QLabel> #include <QMainWindow> diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h --- a/src/qt/bitcoinunits.h +++ b/src/qt/bitcoinunits.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_QT_BITCOINUNITS_H #define BITCOIN_QT_BITCOINUNITS_H -#include <amount.h> +#include <consensus/amount.h> #include <QAbstractListModel> #include <QString> diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp --- a/src/qt/bitcoinunits.cpp +++ b/src/qt/bitcoinunits.cpp @@ -4,6 +4,7 @@ #include <qt/bitcoinunits.h> +#include <consensus/amount.h> #include <currencyunit.h> #include <util/system.h> diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h --- a/src/qt/coincontroldialog.h +++ b/src/qt/coincontroldialog.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_QT_COINCONTROLDIALOG_H #define BITCOIN_QT_COINCONTROLDIALOG_H -#include <amount.h> +#include <consensus/amount.h> #include <QAbstractButton> #include <QAction> diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h --- a/src/qt/guiutil.h +++ b/src/qt/guiutil.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_QT_GUIUTIL_H #define BITCOIN_QT_GUIUTIL_H -#include <amount.h> +#include <consensus/amount.h> #include <fs.h> #include <netaddress.h> diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h --- a/src/qt/optionsmodel.h +++ b/src/qt/optionsmodel.h @@ -5,7 +5,6 @@ #ifndef BITCOIN_QT_OPTIONSMODEL_H #define BITCOIN_QT_OPTIONSMODEL_H -#include <amount.h> #include <qt/guiconstants.h> #include <QAbstractListModel> diff --git a/src/qt/paymentrequestplus.h b/src/qt/paymentrequestplus.h --- a/src/qt/paymentrequestplus.h +++ b/src/qt/paymentrequestplus.h @@ -10,7 +10,7 @@ #include <qt/paymentrequest.pb.h> #pragma GCC diagnostic pop -#include <amount.h> +#include <consensus/amount.h> #include <script/script.h> #include <openssl/x509.h> diff --git a/src/qt/sendcoinsrecipient.h b/src/qt/sendcoinsrecipient.h --- a/src/qt/sendcoinsrecipient.h +++ b/src/qt/sendcoinsrecipient.h @@ -13,7 +13,7 @@ #include <qt/paymentrequestplus.h> #endif -#include <amount.h> +#include <consensus/amount.h> #include <serialize.h> #include <string> diff --git a/src/qt/test/paymentservertests.cpp b/src/qt/test/paymentservertests.cpp --- a/src/qt/test/paymentservertests.cpp +++ b/src/qt/test/paymentservertests.cpp @@ -4,7 +4,7 @@ #include <qt/test/paymentservertests.h> -#include <amount.h> +#include <consensus/amount.h> #include <interfaces/node.h> #include <qt/optionsmodel.h> #include <qt/test/paymentrequestdata.h> diff --git a/src/qt/transactionfilterproxy.h b/src/qt/transactionfilterproxy.h --- a/src/qt/transactionfilterproxy.h +++ b/src/qt/transactionfilterproxy.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_QT_TRANSACTIONFILTERPROXY_H #define BITCOIN_QT_TRANSACTIONFILTERPROXY_H -#include <amount.h> +#include <consensus/amount.h> #include <QDateTime> #include <QSortFilterProxyModel> diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_QT_TRANSACTIONRECORD_H #define BITCOIN_QT_TRANSACTIONRECORD_H -#include <amount.h> +#include <consensus/amount.h> #include <primitives/blockhash.h> #include <primitives/txid.h> diff --git a/src/qt/walletmodeltransaction.h b/src/qt/walletmodeltransaction.h --- a/src/qt/walletmodeltransaction.h +++ b/src/qt/walletmodeltransaction.h @@ -8,7 +8,7 @@ #include <primitives/transaction.h> #include <qt/sendcoinsrecipient.h> -#include <amount.h> +#include <consensus/amount.h> #include <QObject> diff --git a/src/qt/walletview.h b/src/qt/walletview.h --- a/src/qt/walletview.h +++ b/src/qt/walletview.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_QT_WALLETVIEW_H #define BITCOIN_QT_WALLETVIEW_H -#include <amount.h> +#include <consensus/amount.h> #include <QStackedWidget> diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -5,12 +5,12 @@ #include <rpc/blockchain.h> -#include <amount.h> #include <blockfilter.h> #include <chain.h> #include <chainparams.h> #include <coins.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/validation.h> #include <core_io.h> #include <hash.h> diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -3,13 +3,13 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <blockvalidity.h> #include <cashaddrenc.h> #include <chain.h> #include <chainparams.h> #include <config.h> #include <consensus/activation.h> +#include <consensus/amount.h> #include <consensus/consensus.h> #include <consensus/params.h> #include <consensus/validation.h> diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp --- a/src/rpc/misc.cpp +++ b/src/rpc/misc.cpp @@ -3,9 +3,9 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <chainparams.h> #include <config.h> +#include <consensus/amount.h> #include <httpserver.h> #include <index/blockfilterindex.h> #include <index/coinstatsindex.h> diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -7,6 +7,7 @@ #include <chainparams.h> #include <coins.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/validation.h> #include <core_io.h> #include <index/txindex.h> diff --git a/src/rpc/rawtransaction_util.cpp b/src/rpc/rawtransaction_util.cpp --- a/src/rpc/rawtransaction_util.cpp +++ b/src/rpc/rawtransaction_util.cpp @@ -6,6 +6,7 @@ #include <rpc/rawtransaction_util.h> #include <coins.h> +#include <consensus/amount.h> #include <core_io.h> #include <key_io.h> #include <policy/policy.h> diff --git a/src/rpc/server.h b/src/rpc/server.h --- a/src/rpc/server.h +++ b/src/rpc/server.h @@ -7,7 +7,6 @@ #ifndef BITCOIN_RPC_SERVER_H #define BITCOIN_RPC_SERVER_H -#include <amount.h> #include <rpc/command.h> #include <rpc/request.h> #include <rpc/util.h> diff --git a/src/rpc/util.cpp b/src/rpc/util.cpp --- a/src/rpc/util.cpp +++ b/src/rpc/util.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <consensus/amount.h> #include <rpc/util.h> #include <key_io.h> diff --git a/src/script/sign.cpp b/src/script/sign.cpp --- a/src/script/sign.cpp +++ b/src/script/sign.cpp @@ -5,6 +5,7 @@ #include <script/sign.h> +#include <consensus/amount.h> #include <key.h> #include <policy/policy.h> #include <primitives/transaction.h> diff --git a/src/script/standard.h b/src/script/standard.h --- a/src/script/standard.h +++ b/src/script/standard.h @@ -6,7 +6,7 @@ #ifndef BITCOIN_SCRIPT_STANDARD_H #define BITCOIN_SCRIPT_STANDARD_H -#include <amount.h> +#include <consensus/amount.h> #include <pubkey.h> #include <script/script_flags.h> #include <uint256.h> diff --git a/src/test/amount_tests.cpp b/src/test/amount_tests.cpp --- a/src/test/amount_tests.cpp +++ b/src/test/amount_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> +#include <consensus/amount.h> #include <test/util/setup_common.h> diff --git a/src/test/feerate_tests.cpp b/src/test/feerate_tests.cpp --- a/src/test/feerate_tests.cpp +++ b/src/test/feerate_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> +#include <consensus/amount.h> #include <test/util/setup_common.h> diff --git a/src/test/fuzz/coins_view.cpp b/src/test/fuzz/coins_view.cpp --- a/src/test/fuzz/coins_view.cpp +++ b/src/test/fuzz/coins_view.cpp @@ -2,10 +2,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <chainparams.h> #include <chainparamsbase.h> #include <coins.h> +#include <consensus/amount.h> #include <consensus/tx_verify.h> #include <consensus/validation.h> #include <key.h> diff --git a/src/test/fuzz/fee_rate.cpp b/src/test/fuzz/fee_rate.cpp --- a/src/test/fuzz/fee_rate.cpp +++ b/src/test/fuzz/fee_rate.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> +#include <consensus/amount.h> #include <feerate.h> #include <test/fuzz/FuzzedDataProvider.h> #include <test/fuzz/fuzz.h> diff --git a/src/test/fuzz/fees.cpp b/src/test/fuzz/fees.cpp --- a/src/test/fuzz/fees.cpp +++ b/src/test/fuzz/fees.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> +#include <consensus/amount.h> #include <feerate.h> #include <policy/fees.h> diff --git a/src/test/fuzz/integer.cpp b/src/test/fuzz/integer.cpp --- a/src/test/fuzz/integer.cpp +++ b/src/test/fuzz/integer.cpp @@ -2,12 +2,12 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <arith_uint256.h> #include <chainparams.h> #include <clientversion.h> #include <compressor.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/merkle.h> #include <core_io.h> #include <crypto/common.h> diff --git a/src/test/fuzz/script_flags.cpp b/src/test/fuzz/script_flags.cpp --- a/src/test/fuzz/script_flags.cpp +++ b/src/test/fuzz/script_flags.cpp @@ -2,6 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. +#include <consensus/amount.h> #include <pubkey.h> #include <script/interpreter.h> #include <streams.h> diff --git a/src/test/fuzz/util.h b/src/test/fuzz/util.h --- a/src/test/fuzz/util.h +++ b/src/test/fuzz/util.h @@ -5,11 +5,11 @@ #ifndef BITCOIN_TEST_FUZZ_UTIL_H #define BITCOIN_TEST_FUZZ_UTIL_H -#include <amount.h> #include <arith_uint256.h> #include <attributes.h> #include <chainparamsbase.h> #include <coins.h> +#include <consensus/amount.h> #include <netbase.h> #include <script/script.h> #include <script/standard.h> diff --git a/src/test/policy_fee_tests.cpp b/src/test/policy_fee_tests.cpp --- a/src/test/policy_fee_tests.cpp +++ b/src/test/policy_fee_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> +#include <consensus/amount.h> #include <feerate.h> #include <policy/fees.h> diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -7,6 +7,7 @@ #include <checkqueue.h> #include <clientversion.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/tx_check.h> #include <consensus/tx_verify.h> #include <consensus/validation.h> diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h --- a/src/test/util/setup_common.h +++ b/src/test/util/setup_common.h @@ -5,8 +5,8 @@ #ifndef BITCOIN_TEST_UTIL_SETUP_COMMON_H #define BITCOIN_TEST_UTIL_SETUP_COMMON_H -#include <amount.h> #include <chainparamsbase.h> +#include <consensus/amount.h> #include <fs.h> #include <key.h> #include <node/context.h> diff --git a/src/test/validation_tests.cpp b/src/test/validation_tests.cpp --- a/src/test/validation_tests.cpp +++ b/src/test/validation_tests.cpp @@ -8,6 +8,7 @@ #include <chainparams.h> #include <clientversion.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/consensus.h> #include <net.h> #include <primitives/transaction.h> diff --git a/src/txmempool.h b/src/txmempool.h --- a/src/txmempool.h +++ b/src/txmempool.h @@ -6,8 +6,8 @@ #ifndef BITCOIN_TXMEMPOOL_H #define BITCOIN_TXMEMPOOL_H -#include <amount.h> #include <coins.h> +#include <consensus/amount.h> #include <core_memusage.h> #include <indirectmap.h> #include <primitives/transaction.h> diff --git a/src/util/moneystr.h b/src/util/moneystr.h --- a/src/util/moneystr.h +++ b/src/util/moneystr.h @@ -9,8 +9,8 @@ #ifndef BITCOIN_UTIL_MONEYSTR_H #define BITCOIN_UTIL_MONEYSTR_H -#include <amount.h> #include <attributes.h> +#include <consensus/amount.h> #include <string> diff --git a/src/util/moneystr.cpp b/src/util/moneystr.cpp --- a/src/util/moneystr.cpp +++ b/src/util/moneystr.cpp @@ -5,6 +5,7 @@ #include <util/moneystr.h> +#include <consensus/amount.h> #include <tinyformat.h> #include <util/strencodings.h> #include <util/string.h> diff --git a/src/validation.h b/src/validation.h --- a/src/validation.h +++ b/src/validation.h @@ -11,11 +11,11 @@ #include <config/bitcoin-config.h> #endif -#include <amount.h> #include <attributes.h> #include <blockfileinfo.h> #include <blockindexworkcomparator.h> #include <coins.h> +#include <consensus/amount.h> #include <consensus/consensus.h> #include <consensus/validation.h> #include <disconnectresult.h> diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -15,6 +15,7 @@ #include <checkqueue.h> #include <config.h> #include <consensus/activation.h> +#include <consensus/amount.h> #include <consensus/merkle.h> #include <consensus/tx_check.h> #include <consensus/tx_verify.h> diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h --- a/src/wallet/coinselection.h +++ b/src/wallet/coinselection.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_WALLET_COINSELECTION_H #define BITCOIN_WALLET_COINSELECTION_H -#include <amount.h> +#include <consensus/amount.h> #include <primitives/transaction.h> #include <random.h> diff --git a/src/wallet/coinselection.cpp b/src/wallet/coinselection.cpp --- a/src/wallet/coinselection.cpp +++ b/src/wallet/coinselection.cpp @@ -4,6 +4,7 @@ #include <wallet/coinselection.h> +#include <consensus/amount.h> #include <feerate.h> #include <util/moneystr.h> #include <util/system.h> diff --git a/src/wallet/fees.h b/src/wallet/fees.h --- a/src/wallet/fees.h +++ b/src/wallet/fees.h @@ -7,7 +7,7 @@ #ifndef BITCOIN_WALLET_FEES_H #define BITCOIN_WALLET_FEES_H -#include <amount.h> +#include <consensus/amount.h> #include <feerate.h> class CCoinControl; diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3,10 +3,10 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <chainparams.h> // for GetConsensus. #include <coins.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/validation.h> #include <core_io.h> #include <interfaces/chain.h> diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -2,8 +2,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include <amount.h> #include <chainparams.h> // For Params +#include <consensus/amount.h> #include <node/context.h> #include <primitives/transaction.h> #include <random.h> diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -7,7 +7,7 @@ #ifndef BITCOIN_WALLET_WALLET_H #define BITCOIN_WALLET_WALLET_H -#include <amount.h> +#include <consensus/amount.h> #include <interfaces/chain.h> #include <interfaces/handler.h> #include <outputtype.h> diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -8,6 +8,7 @@ #include <chain.h> #include <chainparams.h> #include <config.h> +#include <consensus/amount.h> #include <consensus/consensus.h> #include <consensus/validation.h> #include <fs.h> diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h --- a/src/wallet/walletdb.h +++ b/src/wallet/walletdb.h @@ -7,7 +7,6 @@ #ifndef BITCOIN_WALLET_WALLETDB_H #define BITCOIN_WALLET_WALLETDB_H -#include <amount.h> #include <key.h> #include <script/sign.h> #include <script/standard.h> // for CTxDestination