aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2020-01-24 17:02:41 -0500
committerRussell Yanofsky <russ@yanofsky.org>2020-02-25 05:50:39 -0500
commit3ce16ad2f91d1e2edc7e7bdc5a19f72aa8c3e739 (patch)
tree147d4587a7dec7f33e11802ecdaf7c940339d147
parent1dde238f2c21a0cc9bada10a2449cf9c6b2178ad (diff)
refactor: Use psbt forward declaration
Also clean up forward other forward declarations in interfaces/wallet.h with !sort Original motivation for this change was to fix a circular dependencies lint error: "interfaces/chain.h -> interfaces/wallet.h -> psbt -> node/transaction -> node/context -> interfaces/chain.h" from an earlier commit in this PR adding a "interfaces/chain.h -> interfaces/wallet.h" include. Now, the wallet include is no longer added, but it is still good to clean up the psbt include for efficiency, and to sort the forward declarations.
-rw-r--r--src/interfaces/wallet.h8
-rw-r--r--src/qt/walletmodel.cpp1
2 files changed, 5 insertions, 4 deletions
diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h
index d4280e8091..935fc6992e 100644
--- a/src/interfaces/wallet.h
+++ b/src/interfaces/wallet.h
@@ -14,7 +14,6 @@
#include <functional>
#include <map>
#include <memory>
-#include <psbt.h>
#include <stdint.h>
#include <string>
#include <tuple>
@@ -25,12 +24,13 @@ class CCoinControl;
class CFeeRate;
class CKey;
class CWallet;
-enum isminetype : unsigned int;
enum class FeeReason;
-typedef uint8_t isminefilter;
-
enum class OutputType;
+enum class TransactionError;
+enum isminetype : unsigned int;
struct CRecipient;
+struct PartiallySignedTransaction;
+typedef uint8_t isminefilter;
namespace interfaces {
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 8a84a8c168..83796c3840 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -20,6 +20,7 @@
#include <interfaces/handler.h>
#include <interfaces/node.h>
#include <key_io.h>
+#include <psbt.h>
#include <ui_interface.h>
#include <util/system.h> // for GetBoolArg
#include <wallet/coincontrol.h>