Make coincontrol use IsSolvable to determine solvability
This commit is contained in:
parent
baf6b4e3f9
commit
6d714c3419
2 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ public:
|
|||
boost::optional<OutputType> m_change_type;
|
||||
//! If false, allows unselected inputs, but requires all selected inputs be used
|
||||
bool fAllowOtherInputs;
|
||||
//! Includes watch only addresses which match the ISMINE_WATCH_SOLVABLE criteria
|
||||
//! Includes watch only addresses which are solvable
|
||||
bool fAllowWatchOnly;
|
||||
//! Override automatic min/max checks on fee, m_feerate must be set if true
|
||||
bool fOverrideFeeRate;
|
||||
|
|
|
@ -2363,10 +2363,10 @@ void CWallet::AvailableCoins(std::vector<COutput> &vCoins, bool fOnlySafe, const
|
|||
continue;
|
||||
}
|
||||
|
||||
bool fSpendableIn = ((mine & ISMINE_SPENDABLE) != ISMINE_NO) || (coinControl && coinControl->fAllowWatchOnly && (mine & ISMINE_WATCH_SOLVABLE) != ISMINE_NO);
|
||||
bool fSolvableIn = (mine & (ISMINE_SPENDABLE | ISMINE_WATCH_SOLVABLE)) != ISMINE_NO;
|
||||
bool solvable = IsSolvable(*this, pcoin->tx->vout[i].scriptPubKey);
|
||||
bool spendable = ((mine & ISMINE_SPENDABLE) != ISMINE_NO) || (((mine & ISMINE_WATCH_ONLY) != ISMINE_NO) && (coinControl && coinControl->fAllowWatchOnly && solvable));
|
||||
|
||||
vCoins.push_back(COutput(pcoin, i, nDepth, fSpendableIn, fSolvableIn, safeTx));
|
||||
vCoins.push_back(COutput(pcoin, i, nDepth, spendable, solvable, safeTx));
|
||||
|
||||
// Checks the sum amount of all UTXO's.
|
||||
if (nMinimumSumAmount != MAX_MONEY) {
|
||||
|
|
Loading…
Add table
Reference in a new issue