You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wallet: return error msg for too-long-mempool-chain failure
We currently return "Insufficient funds" which doesn't really
describe what went wrong; the tx creation failed because of
a long-mempool-chain, not because of a lack of funds.
Also, return early from Coin Selection if the sum of the
discarded coins decreases the available balance below the
target amount.
if (CAmount total_amount = available_coins.GetTotalAmount() - total_discarded < value_to_select) {
723
+
// Special case, too-long-mempool cluster.
724
+
if (total_amount + total_unconf_long_chain > value_to_select) {
725
+
return util::Result<SelectionResult>({_("Unconfirmed UTXOs are available, but spending them creates a chain of transactions that will be rejected by the mempool")});
726
+
}
727
+
return util::Result<SelectionResult>(util::Error()); // General "Insufficient Funds"
728
+
}
696
729
697
730
// Walk-through the filters until the solution gets found.
698
731
// If no solution is found, return the first detailed error (if any).
0 commit comments