@@ -332,7 +332,7 @@ CoinsResult AvailableCoins(const CWallet& wallet,
332332
333333 // Checks the sum amount of all UTXO's.
334334 if (params.min_sum_amount != MAX_MONEY) {
335- if (result.total_amount >= params.min_sum_amount ) {
335+ if (result.GetTotalAmount () >= params.min_sum_amount ) {
336336 return result;
337337 }
338338 }
@@ -356,7 +356,7 @@ CoinsResult AvailableCoinsListUnspent(const CWallet& wallet, const CCoinControl*
356356CAmount GetAvailableBalance (const CWallet& wallet, const CCoinControl* coinControl)
357357{
358358 LOCK (wallet.cs_wallet );
359- return AvailableCoins (wallet, coinControl).total_amount ;
359+ return AvailableCoins (wallet, coinControl).GetTotalAmount () ;
360360}
361361
362362const CTxOut& FindNonChangeParentOutput (const CWallet& wallet, const CTransaction& tx, int output)
@@ -586,8 +586,8 @@ std::optional<SelectionResult> SelectCoins(const CWallet& wallet, CoinsResult& a
586586
587587 // Return early if we cannot cover the target with the wallet's UTXO.
588588 // 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 );
591591 if (selection_target > available_coins_total_amount) {
592592 return std::nullopt ; // Insufficient funds
593593 }
0 commit comments