diff --git a/src/Makefile.am b/src/Makefile.am index 65bf28035a..1ba29a075c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -699,11 +699,11 @@ crypto_libbitcoin_crypto_arm_shani_a_SOURCES = crypto/sha256_arm_shani.cpp libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) libbitcoin_consensus_a_SOURCES = \ - amount.h \ arith_uint256.cpp \ arith_uint256.h \ bls/bls.cpp \ bls/bls.h \ + consensus/amount.h \ consensus/merkle.cpp \ consensus/merkle.h \ consensus/params.h \ diff --git a/src/addressindex.h b/src/addressindex.h index b5cbcefc1f..55dbc8284a 100644 --- a/src/addressindex.h +++ b/src/addressindex.h @@ -8,7 +8,7 @@ #ifndef BITCOIN_ADDRESSINDEX_H #define BITCOIN_ADDRESSINDEX_H -#include +#include #include #include #include diff --git a/src/coinjoin/common.h b/src/coinjoin/common.h index 165664c3d1..def3ffc83a 100644 --- a/src/coinjoin/common.h +++ b/src/coinjoin/common.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_COINJOIN_COMMON_H #define BITCOIN_COINJOIN_COMMON_H -#include +#include #include #include diff --git a/src/coinjoin/options.h b/src/coinjoin/options.h index 5c48a84a6e..8782df0e1b 100644 --- a/src/coinjoin/options.h +++ b/src/coinjoin/options.h @@ -5,7 +5,8 @@ #ifndef BITCOIN_COINJOIN_OPTIONS_H #define BITCOIN_COINJOIN_OPTIONS_H -#include +#include + #include #include diff --git a/src/amount.h b/src/consensus/amount.h similarity index 80% rename from src/amount.h rename to src/consensus/amount.h index 47968e80b1..8b41a2277d 100644 --- a/src/amount.h +++ b/src/consensus/amount.h @@ -3,15 +3,15 @@ // 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 +#include /** Amount in satoshis (Can be negative) */ typedef int64_t CAmount; -static const CAmount COIN = 100000000; +static constexpr CAmount COIN = 100000000; /** No amount larger than this (in satoshi) is valid. * @@ -22,7 +22,7 @@ static const CAmount COIN = 100000000; * 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 CAmount MAX_MONEY = 21000000 * COIN; +static constexpr CAmount MAX_MONEY = 21000000 * COIN; inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); } -#endif // BITCOIN_AMOUNT_H +#endif // BITCOIN_CONSENSUS_AMOUNT_H diff --git a/src/consensus/tx_check.cpp b/src/consensus/tx_check.cpp index 6300879914..3908f483d0 100644 --- a/src/consensus/tx_check.cpp +++ b/src/consensus/tx_check.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include diff --git a/src/consensus/tx_verify.h b/src/consensus/tx_verify.h index 4fbae4c540..76bbe68311 100644 --- a/src/consensus/tx_verify.h +++ b/src/consensus/tx_verify.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_CONSENSUS_TX_VERIFY_H #define BITCOIN_CONSENSUS_TX_VERIFY_H -#include +#include #include #include diff --git a/src/core_io.h b/src/core_io.h index a24d7d5d7f..c416dd8501 100644 --- a/src/core_io.h +++ b/src/core_io.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_CORE_IO_H #define BITCOIN_CORE_IO_H -#include +#include #include #include diff --git a/src/core_write.cpp b/src/core_write.cpp index a2cdf68aa4..35f9bc2555 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -4,6 +4,7 @@ #include +#include #include #include #include diff --git a/src/evo/dmn_types.h b/src/evo/dmn_types.h index edc36187dd..d532c6b3a6 100644 --- a/src/evo/dmn_types.h +++ b/src/evo/dmn_types.h @@ -5,7 +5,7 @@ #ifndef BITCOIN_EVO_DMN_TYPES_H #define BITCOIN_EVO_DMN_TYPES_H -#include +#include #include #include diff --git a/src/governance/classes.h b/src/governance/classes.h index 3e42f2bdf0..030ae5f050 100644 --- a/src/governance/classes.h +++ b/src/governance/classes.h @@ -4,7 +4,7 @@ #ifndef BITCOIN_GOVERNANCE_CLASSES_H #define BITCOIN_GOVERNANCE_CLASSES_H -#include +#include #include #include