Is your feature request related to a problem? Please describe.
If coin selection fails as part of send
or sendtoaddress
, the error message returned to the RPC client is Insufficient funds
, even if the actual cause is due to too-long-mempool-chain
. This is likely to alarm users unnecessarily, as they will believe this means their funds have permanently vanished rather than being temporarily inaccessible.
Describe the solution you’d like
If coin selection fails due to too-long-mempool-chain
, the send
and sendtoaddress
methods should pass that error back to the RPC client, instead of Insufficient funds
.
Describe alternatives you’ve considered
It would be even nicer from a UX standpoint if the limit on mempool chain length were removed, but AIUI that’s a DoS vector, so is not going to happen.
Additional context
Apparently this is already done for sendrawtransaction
. The discussion in #10015 is relevant (it appears that the PR was withdrawn for reasons unrelated to my request).