Skip to content

Commit 9cbd87d

Browse files
committed
Merge bitcoin#17518: refactor, wallet: Nuke coincontrol circular dependency
3ed5e68 refactor: Nuke coincontrol circular dependency (Hennadii Stepanov) Pull request description: This PR gets rid of `wallet/coincontrol` -> `wallet/wallet` -> `wallet/coincontrol` circular dependency. ACKs for top commit: Sjors: re-ACK 3ed5e68 meshcollider: utACK 3ed5e68 Tree-SHA512: 7fbceb74a9cd04157170df158d2deb979cf397df818376b478224d2423f1d8504a8688e3a9b8fc527da73e4a34ab6bc4a98be0cc2937e102a063ab2ac553e86d
2 parents 2c98e20 + 3ed5e68 commit 9cbd87d

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <wallet/coincontrol.h>
2828
#include <wallet/fees.h>
2929
#include <wallet/psbtwallet.h>
30+
#include <wallet/wallet.h>
3031

3132
#include <QFontMetrics>
3233
#include <QScrollBar>

src/wallet/coincontrol.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
#define BITCOIN_WALLET_COINCONTROL_H
77

88
#include <optional.h>
9+
#include <outputtype.h>
910
#include <policy/feerate.h>
1011
#include <policy/fees.h>
1112
#include <primitives/transaction.h>
12-
#include <wallet/wallet.h>
13+
#include <script/standard.h>
1314

1415
const int DEFAULT_MIN_DEPTH = 0;
1516
const int DEFAULT_MAX_DEPTH = 9999999;
1617

18+
//! Default for -avoidpartialspends
19+
static constexpr bool DEFAULT_AVOIDPARTIALSPENDS = false;
20+
1721
/** Coin Control Features. */
1822
class CCoinControl
1923
{

src/wallet/init.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
#include <net.h>
99
#include <node/context.h>
1010
#include <outputtype.h>
11+
#include <ui_interface.h>
1112
#include <util/moneystr.h>
1213
#include <util/system.h>
1314
#include <util/translation.h>
15+
#include <wallet/coincontrol.h>
1416
#include <wallet/wallet.h>
1517
#include <walletinitinterface.h>
1618

src/wallet/wallet.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ static const CAmount WALLET_INCREMENTAL_RELAY_FEE = 5000;
7171
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true;
7272
//! Default for -walletrejectlongchains
7373
static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false;
74-
//! Default for -avoidpartialspends
75-
static const bool DEFAULT_AVOIDPARTIALSPENDS = false;
7674
//! -txconfirmtarget default
7775
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6;
7876
//! -walletrbf default

test/lint/lint-circular-dependencies.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ EXPECTED_CIRCULAR_DEPENDENCIES=(
2222
"qt/sendcoinsdialog -> qt/walletmodel -> qt/sendcoinsdialog"
2323
"qt/transactiontablemodel -> qt/walletmodel -> qt/transactiontablemodel"
2424
"txmempool -> validation -> txmempool"
25-
"wallet/coincontrol -> wallet/wallet -> wallet/coincontrol"
2625
"wallet/fees -> wallet/wallet -> wallet/fees"
2726
"wallet/wallet -> wallet/walletdb -> wallet/wallet"
2827
"policy/fees -> txmempool -> validation -> policy/fees"

0 commit comments

Comments
 (0)