Skip to content

Commit d09071d

Browse files
committed
[MOVEONLY] consensus: move amount.h into consensus
Move amount.h to consensus/amount.h. Renames, adds missing and removes uneeded includes.
1 parent 419afa9 commit d09071d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+71
-51
lines changed

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,9 @@ crypto_libbitcoin_crypto_shani_a_SOURCES = crypto/sha256_shani.cpp
498498
libbitcoin_consensus_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
499499
libbitcoin_consensus_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
500500
libbitcoin_consensus_a_SOURCES = \
501-
amount.h \
502501
arith_uint256.cpp \
503502
arith_uint256.h \
503+
consensus/amount.h \
504504
consensus/merkle.cpp \
505505
consensus/merkle.h \
506506
consensus/params.h \

src/bitcoin-tx.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
#include <clientversion.h>
1010
#include <coins.h>
11+
#include <consensus/amount.h>
1112
#include <consensus/consensus.h>
1213
#include <core_io.h>
1314
#include <key_io.h>

src/amount.h renamed to src/consensus/amount.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
#ifndef BITCOIN_AMOUNT_H
7-
#define BITCOIN_AMOUNT_H
6+
#ifndef BITCOIN_CONSENSUS_AMOUNT_H
7+
#define BITCOIN_CONSENSUS_AMOUNT_H
88

99
#include <stdint.h>
1010

@@ -25,4 +25,4 @@ static const CAmount COIN = 100000000;
2525
static const CAmount MAX_MONEY = 21000000 * COIN;
2626
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
2727

28-
#endif // BITCOIN_AMOUNT_H
28+
#endif // BITCOIN_CONSENSUS_AMOUNT_H

src/consensus/tx_check.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <consensus/tx_check.h>
66

7+
#include <consensus/amount.h>
78
#include <primitives/transaction.h>
89
#include <consensus/validation.h>
910

src/consensus/tx_verify.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <consensus/tx_verify.h>
66

7+
#include <consensus/amount.h>
78
#include <consensus/consensus.h>
89
#include <primitives/transaction.h>
910
#include <script/interpreter.h>

src/consensus/tx_verify.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef BITCOIN_CONSENSUS_TX_VERIFY_H
66
#define BITCOIN_CONSENSUS_TX_VERIFY_H
77

8-
#include <amount.h>
8+
#include <consensus/amount.h>
99

1010
#include <stdint.h>
1111
#include <vector>

src/core_io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef BITCOIN_CORE_IO_H
66
#define BITCOIN_CORE_IO_H
77

8-
#include <amount.h>
8+
#include <consensus/amount.h>
99
#include <attributes.h>
1010

1111
#include <string>

src/core_write.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
#include <core_io.h>
66

7+
#include <consensus/amount.h>
78
#include <consensus/consensus.h>
89
#include <consensus/validation.h>
910
#include <key_io.h>

src/init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
#include <init.h>
1111

1212
#include <addrman.h>
13-
#include <amount.h>
1413
#include <banman.h>
1514
#include <blockfilter.h>
1615
#include <chain.h>
1716
#include <chainparams.h>
1817
#include <compat/sanity.h>
18+
#include <consensus/amount.h>
1919
#include <deploymentstatus.h>
2020
#include <fs.h>
2121
#include <hash.h>

src/interfaces/node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#ifndef BITCOIN_INTERFACES_NODE_H
66
#define BITCOIN_INTERFACES_NODE_H
77

8-
#include <amount.h> // For CAmount
8+
#include <consensus/amount.h>
99
#include <external_signer.h>
1010
#include <net.h> // For NodeId
1111
#include <net_types.h> // For banmap_t

0 commit comments

Comments
 (0)