@@ -332,7 +332,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
332
332
333
333
// Checks the sum amount of all UTXO's.
334
334
if (params.min_sum_amount != MAX_MONEY) {
335
- if (result.total_amount >= params.min_sum_amount ) {
335
+ if (result.GetTotalAmount () >= params.min_sum_amount ) {
336
336
return result;
337
337
}
338
338
}
@@ -356,7 +356,7 @@ CoinsResult AvailableCoinsListUnspent(const CWallet& wallet, const CCoinControl*
356
356
CAmount GetAvailableBalance (const CWallet& wallet, const CCoinControl* coinControl)
357
357
{
358
358
LOCK (wallet.cs_wallet );
359
- return AvailableCoins (wallet, coinControl).total_amount ;
359
+ return AvailableCoins (wallet, coinControl).GetTotalAmount () ;
360
360
}
361
361
362
362
const CTxOut& FindNonChangeParentOutput (const CWallet& wallet, const CTransaction& tx, int output)
@@ -586,8 +586,8 @@ std::optional<SelectionResult> SelectCoins(const CWallet& wallet, CoinsResult& a
586
586
587
587
// Return early if we cannot cover the target with the wallet's UTXO.
588
588
// We use the total effective value if we are not subtracting fee from outputs and 'available_coins' contains the data.
589
- CAmount available_coins_total_amount = coin_selection_params.m_subtract_fee_outputs ? available_coins.total_amount :
590
- (available_coins.total_effective_amount .has_value () ? *available_coins.total_effective_amount : 0 );
589
+ CAmount available_coins_total_amount = coin_selection_params.m_subtract_fee_outputs ? available_coins.GetTotalAmount () :
590
+ (available_coins.GetEffectiveTotalAmount () .has_value () ? *available_coins.GetEffectiveTotalAmount () : 0 );
591
591
if (selection_target > available_coins_total_amount) {
592
592
return std::nullopt; // Insufficient funds
593
593
}
0 commit comments