diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h index d36314312ad..d7075bc8d6e 100644 --- a/src/wallet/coincontrol.h +++ b/src/wallet/coincontrol.h @@ -89,8 +89,6 @@ public: //! If true, the selection process can add extra unselected inputs from the wallet //! while requires all selected inputs be used bool m_allow_other_inputs = true; - //! Includes watch only addresses which are solvable - bool fAllowWatchOnly = false; //! Override automatic min/max checks on fee, m_feerate must be set if true bool fOverrideFeeRate = false; //! Override the wallet's m_pay_tx_fee if set diff --git a/src/wallet/rpc/spend.cpp b/src/wallet/rpc/spend.cpp index 4e6fc63c486..00f709c616a 100644 --- a/src/wallet/rpc/spend.cpp +++ b/src/wallet/rpc/spend.cpp @@ -1067,7 +1067,6 @@ static RPCHelpMan bumpfee_helper(std::string method_name) Txid hash{Txid::FromUint256(ParseHashV(request.params[0], "txid"))}; CCoinControl coin_control; - coin_control.fAllowWatchOnly = pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS); // optional parameters coin_control.m_signal_bip125_rbf = true; std::vector outputs; diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index fe3f4b57b95..f054acb9bbd 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -54,7 +54,7 @@ static bool IsSegwit(const Descriptor& desc) { static bool UseMaxSig(const std::optional& txin, const CCoinControl* coin_control) { // Use max sig if watch only inputs were used or if this particular input is an external input // to ensure a sufficient fee is attained for the requested feerate. - return coin_control && (coin_control->fAllowWatchOnly || (txin && coin_control->IsExternalSelected(txin->prevout))); + return coin_control && txin && coin_control->IsExternalSelected(txin->prevout); } /** Get the size of an input (in witness units) once it's signed. @@ -429,7 +429,7 @@ CoinsResult AvailableCoins(const CWallet& wallet, // Because CalculateMaximumSignedInputSize infers a solvable descriptor to get the satisfaction size, // it is safe to assume that this input is solvable if input_bytes is greater than -1. bool solvable = input_bytes > -1; - bool spendable = ((mine & ISMINE_SPENDABLE) != ISMINE_NO) || (((mine & ISMINE_WATCH_ONLY) != ISMINE_NO) && (coinControl && coinControl->fAllowWatchOnly && solvable)); + bool spendable = (mine & ISMINE_SPENDABLE) != ISMINE_NO; // Filter by spendable outputs only if (!spendable && params.only_spendable) continue;