aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-08-02 16:59:40 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-08-18 08:20:43 +0200
commitfa6286891fa4164510e4fbf4bc214ce3033b2d1b (patch)
tree3a0f3396d3c7867ea4bf02b0b20b5df1beb2576a /src
parentfa8fdbe22932a4717d2bc4060269da9bff228728 (diff)
Remove unused includes from wallet.cpp
This removes unused includes, such as undo.h or txmempool.h from wallet.cpp. Also, add missing ones, according to IWYU.
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet.cpp51
-rw-r--r--src/wallet/wallet.h51
2 files changed, 78 insertions, 24 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index fd9a3e5a30..567db46062 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -5,51 +5,82 @@
#include <wallet/wallet.h>
+#if defined(HAVE_CONFIG_H)
+#include <config/bitcoin-config.h>
+#endif
+#include <addresstype.h>
#include <blockfilter.h>
#include <chain.h>
+#include <coins.h>
#include <common/args.h>
+#include <common/settings.h>
+#include <common/system.h>
#include <consensus/amount.h>
#include <consensus/consensus.h>
#include <consensus/validation.h>
#include <external_signer.h>
#include <interfaces/chain.h>
+#include <interfaces/handler.h>
#include <interfaces/wallet.h>
+#include <kernel/mempool_removal_reason.h>
#include <key.h>
#include <key_io.h>
+#include <logging.h>
#include <outputtype.h>
-#include <policy/fees.h>
-#include <policy/policy.h>
+#include <policy/feerate.h>
#include <primitives/block.h>
#include <primitives/transaction.h>
#include <psbt.h>
+#include <pubkey.h>
#include <random.h>
#include <script/descriptor.h>
+#include <script/interpreter.h>
#include <script/script.h>
+#include <script/sign.h>
#include <script/signingprovider.h>
#include <script/solver.h>
+#include <serialize.h>
+#include <span.h>
+#include <streams.h>
+#include <support/allocators/secure.h>
+#include <support/allocators/zeroafterfree.h>
#include <support/cleanse.h>
-#include <txmempool.h>
-#include <util/bip32.h>
+#include <sync.h>
+#include <tinyformat.h>
+#include <uint256.h>
+#include <univalue.h>
#include <util/check.h>
#include <util/error.h>
-#include <util/fees.h>
#include <util/fs.h>
#include <util/fs_helpers.h>
+#include <util/message.h>
#include <util/moneystr.h>
-#include <util/rbf.h>
+#include <util/result.h>
#include <util/string.h>
+#include <util/time.h>
#include <util/translation.h>
#include <wallet/coincontrol.h>
#include <wallet/context.h>
+#include <wallet/crypter.h>
+#include <wallet/db.h>
#include <wallet/external_signer_scriptpubkeyman.h>
-#include <wallet/fees.h>
#include <wallet/scriptpubkeyman.h>
-
-#include <univalue.h>
+#include <wallet/transaction.h>
+#include <wallet/types.h>
+#include <wallet/walletdb.h>
+#include <wallet/walletutil.h>
#include <algorithm>
-#include <assert.h>
+#include <cassert>
+#include <condition_variable>
+#include <exception>
#include <optional>
+#include <stdexcept>
+#include <thread>
+#include <tuple>
+#include <variant>
+
+struct KeyOriginInfo;
using interfaces::FoundBlock;
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 91c8e89d2d..4405a442c4 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -10,47 +10,72 @@
#include <consensus/amount.h>
#include <interfaces/chain.h>
#include <interfaces/handler.h>
-#include <interfaces/wallet.h>
+#include <kernel/cs_main.h>
#include <logging.h>
#include <outputtype.h>
#include <policy/feerate.h>
-#include <psbt.h>
+#include <primitives/transaction.h>
+#include <script/interpreter.h>
+#include <script/script.h>
+#include <support/allocators/secure.h>
+#include <sync.h>
#include <tinyformat.h>
+#include <uint256.h>
#include <util/fs.h>
#include <util/hasher.h>
-#include <util/message.h>
#include <util/result.h>
-#include <util/strencodings.h>
#include <util/string.h>
#include <util/time.h>
#include <util/ui_change_type.h>
-#include <validationinterface.h>
#include <wallet/crypter.h>
+#include <wallet/db.h>
#include <wallet/scriptpubkeyman.h>
#include <wallet/transaction.h>
-#include <wallet/walletdb.h>
+#include <wallet/types.h>
#include <wallet/walletutil.h>
-#include <algorithm>
#include <atomic>
+#include <cassert>
+#include <cstddef>
+#include <cstdint>
+#include <functional>
+#include <limits>
#include <map>
#include <memory>
#include <optional>
#include <set>
-#include <stdexcept>
-#include <stdint.h>
#include <string>
-#include <utility>
#include <unordered_map>
+#include <utility>
#include <vector>
#include <boost/signals2/signal.hpp>
+class CKey;
+class CKeyID;
+class CPubKey;
+class Coin;
+class SigningProvider;
+enum class MemPoolRemovalReason;
+enum class SigningResult;
+enum class TransactionError;
+namespace interfaces {
+class Wallet;
+}
+namespace wallet {
+class CWallet;
+class WalletBatch;
+enum class DBErrors : int;
+} // namespace wallet
+struct CBlockLocator;
+struct CExtKey;
+struct FlatSigningProvider;
+struct KeyOriginInfo;
+struct PartiallySignedTransaction;
+struct SignatureData;
using LoadWalletFn = std::function<void(std::unique_ptr<interfaces::Wallet> wallet)>;
-class CScript;
-enum class FeeEstimateMode;
struct bilingual_str;
namespace wallet {
@@ -119,8 +144,6 @@ constexpr CAmount HIGH_MAX_TX_FEE{100 * HIGH_TX_FEE_PER_KB};
static constexpr size_t DUMMY_NESTED_P2WPKH_INPUT_SIZE = 91;
class CCoinControl;
-class CWalletTx;
-class ReserveDestination;
//! Default for -addresstype
constexpr OutputType DEFAULT_ADDRESS_TYPE{OutputType::BECH32};