This bugfix was meant to be in #25685, but decoupled it to try to make it part of 24.0 release. It’s a truly misleading functionality.
This PR doesn’t change behavior in any way. Just fixes two invalid RPC help messages and adds test coverage for the current behavior.
Description
In both RPC commands send()
and walletcreatefundedpsbt
the help message says
that add_inputs
default value is false when it’s actually dynamically set by the following statement:
0coin_control.m_allow_other_inputs = rawTx.vin.size() == 0;
Which means that, by default, add_inputs
is true unless there is any pre-set input, in which
case, the default is false.