Skip to content

Commit 9b12523

Browse files
committed
fixme: src/wallet/spend.cpp
1 parent d57affd commit 9b12523

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/wallet/spend.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ util::Result<SelectionResult> AutomaticCoinSelection(const CWallet& wallet, Coin
974974
if (group.m_ancestors >= max_ancestors || group.m_descendants >= max_descendants) total_unconf_long_chain += group.GetSelectionAmount();
975975
}
976976

977-
if (CAmount total_amount = available_coins.GetTotalAmount() - CAmountMap{{::policyAsset, total_discarded}} < value_to_select) { // ELEMENTS FIXME: check this
977+
if (CAmount total_amount = available_coins.GetTotalAmount() - CAmountMap{{::policyAsset, total_discarded}} < value_to_select) {
978978
// Special case, too-long-mempool cluster.
979979
if (CAmountMap{{::policyAsset, total_amount + total_unconf_long_chain}} > value_to_select) {
980980
return util::Result<SelectionResult>({_("Unconfirmed UTXOs are available, but spending them creates a chain of transactions that will be rejected by the mempool")});
@@ -1383,9 +1383,6 @@ static util::Result<CreatedTransactionResult> CreateTransactionInternal(
13831383
coin_selection_params.m_change_fee = coin_selection_params.m_effective_feerate.GetFee(coin_selection_params.change_output_size);
13841384
coin_selection_params.m_cost_of_change = coin_selection_params.m_discard_feerate.GetFee(coin_selection_params.change_spend_size) + coin_selection_params.m_change_fee;
13851385

1386-
// ELEMENTS FIXME: Please review the map_recipients_sum[::policyAsset] part.
1387-
// In bitcoin the line just says recipients_sum (it's not a map).
1388-
// I'm not sure if the policyAsset value is the right number to use.
13891386
coin_selection_params.m_min_change_target = GenerateChangeTarget(std::floor(map_recipients_sum[::policyAsset] / vecSend.size()), coin_selection_params.m_change_fee, rng_fast);
13901387

13911388
// The smallest change amount should be:

0 commit comments

Comments
 (0)