Skip to content

Commit

Permalink
refactor: Remove defunct attributes.h includes
Browse files Browse the repository at this point in the history
Since the removal of NODISCARD in 81d5af4,
the only attributes def is LIFETIMEBOUND, and it's included in many more
places that it is used.

This removes all includes which do not have an associated use of LIFETIMEBOUND,
and adds it to the following files, due to their use of the same:
* src/validationinterface.h
* src/script/standard.h
  • Loading branch information
Empact committed May 21, 2022
1 parent 640eb77 commit 71a8dbe
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/base58.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#ifndef BITCOIN_BASE58_H
#define BITCOIN_BASE58_H

#include <attributes.h>
#include <span.h>

#include <string>
Expand Down
1 change: 0 additions & 1 deletion src/core_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define BITCOIN_CORE_IO_H

#include <consensus/amount.h>
#include <attributes.h>

#include <string>
#include <vector>
Expand Down
1 change: 0 additions & 1 deletion src/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef BITCOIN_HASH_H
#define BITCOIN_HASH_H

#include <attributes.h>
#include <crypto/common.h>
#include <crypto/ripemd160.h>
#include <crypto/sha256.h>
Expand Down
1 change: 0 additions & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
#include <vector>

#ifndef WIN32
#include <attributes.h>
#include <cerrno>
#include <signal.h>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion src/netaddress.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <config/bitcoin-config.h>
#endif

#include <attributes.h>
#include <compat.h>
#include <crypto/siphash.h>
#include <prevector.h>
Expand Down
1 change: 0 additions & 1 deletion src/node/transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef BITCOIN_NODE_TRANSACTION_H
#define BITCOIN_NODE_TRANSACTION_H

#include <attributes.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
#include <util/error.h>
Expand Down
1 change: 0 additions & 1 deletion src/outputtype.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#ifndef BITCOIN_OUTPUTTYPE_H
#define BITCOIN_OUTPUTTYPE_H

#include <attributes.h>
#include <script/signingprovider.h>
#include <script/standard.h>

Expand Down
1 change: 0 additions & 1 deletion src/psbt.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef BITCOIN_PSBT_H
#define BITCOIN_PSBT_H

#include <attributes.h>
#include <node/transaction.h>
#include <policy/feerate.h>
#include <primitives/transaction.h>
Expand Down
1 change: 1 addition & 0 deletions src/script/standard.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#ifndef BITCOIN_SCRIPT_STANDARD_H
#define BITCOIN_SCRIPT_STANDARD_H

#include <attributes.h>
#include <pubkey.h>
#include <script/interpreter.h>
#include <uint256.h>
Expand Down
1 change: 0 additions & 1 deletion src/test/coins_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#include <attributes.h>
#include <clientversion.h>
#include <coins.h>
#include <script/standard.h>
Expand Down
1 change: 0 additions & 1 deletion src/test/fuzz/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define BITCOIN_TEST_FUZZ_UTIL_H

#include <arith_uint256.h>
#include <attributes.h>
#include <chainparamsbase.h>
#include <coins.h>
#include <compat.h>
Expand Down
1 change: 0 additions & 1 deletion src/util/bip32.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#ifndef BITCOIN_UTIL_BIP32_H
#define BITCOIN_UTIL_BIP32_H

#include <attributes.h>
#include <string>
#include <vector>

Expand Down
1 change: 0 additions & 1 deletion src/util/moneystr.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#ifndef BITCOIN_UTIL_MONEYSTR_H
#define BITCOIN_UTIL_MONEYSTR_H

#include <attributes.h>
#include <consensus/amount.h>

#include <optional>
Expand Down
1 change: 0 additions & 1 deletion src/util/strencodings.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#ifndef BITCOIN_UTIL_STRENCODINGS_H
#define BITCOIN_UTIL_STRENCODINGS_H

#include <attributes.h>
#include <span.h>
#include <util/string.h>

Expand Down
1 change: 0 additions & 1 deletion src/util/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <config/bitcoin-config.h>
#endif

#include <attributes.h>
#include <compat.h>
#include <compat/assumptions.h>
#include <fs.h>
Expand Down
1 change: 1 addition & 0 deletions src/validationinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <validationinterface.h>

#include <attributes.h>
#include <chain.h>
#include <consensus/validation.h>
#include <logging.h>
Expand Down

0 comments on commit 71a8dbe

Please sign in to comment.