> Currently CheckTxInputs rejections from the mempool are the only rejections that log directly and unconditionally to debug.log instead of leaving it to the caller. This has multiple issues:
>
> - A rejected RPC transaction will log a redundant failure reason to debug log. All other failures are merely reported to the RPC user.
> - A rejected p2p transaction will log the failure twice. Once with the MEMPOOLREJ flag, and once unconditionally.
> - A rejected orphan transaction will log no failure.
>
> Fix all issues by simply returning the state to the caller, like it is done for all other rejections.
This is a backport of core#18990