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
f3221d3 test: add wallet too-long-mempool-chain error coverage (furszy)
acf0119 wallet: return error msg for too-long-mempool-chain failure (furszy)
Pull request description:
Fixes #23144.
We currently return a general "Insufficient funds" from Coin
Selection when we actually skipped unconfirmed UTXOs that
surpassed the mempool ancestors limit.
This PR make the error clearer by returning:
"Unconfirmed UTXOs are available, but spending them creates
a chain of transactions that will be rejected by the mempool"
Also, added an early return from Coin Selection if the sum of
the discarded coins decreases the available balance below the
target amount.
ACKs for top commit:
achow101:
ACK f3221d3
S3RK:
Code review ACK f3221d3
Xekyo:
ACK f3221d3
Tree-SHA512: 13e5824b75ac302280ff894560a4ebf32a74f32fe49ef8281f2bc99c0104b92cef33d3b143c6e131f3a07eafe64533af7fc60abff585142c134b9d6e531a6a66
if (CAmount total_amount = available_coins.GetTotalAmount() - total_discarded < value_to_select) {
716
+
// Special case, too-long-mempool cluster.
717
+
if (total_amount + total_unconf_long_chain > value_to_select) {
718
+
return util::Result<SelectionResult>({_("Unconfirmed UTXOs are available, but spending them creates a chain of transactions that will be rejected by the mempool")});
719
+
}
720
+
return util::Result<SelectionResult>(util::Error()); // General "Insufficient Funds"
721
+
}
689
722
690
723
// Walk-through the filters until the solution gets found.
691
724
// If no solution is found, return the first detailed error (if any).
0 commit comments