sendall with the inputs option doesn't check for duplicates. Each listed input is added to total_input_value in the loop at spend.cpp:1472, so passing the same UTXO twice counts its value twice.
On regtest, with a wallet that has a single 1 BTC UTXO:
sendall '["<addr>"]' '{"inputs": [<utxo>, <utxo>]}'
- the RPC returns
complete: true - the committed tx has 2 inputs (the same outpoint twice) and one output of 1.99998230 BTC
- it isn't in the mempool, and
testmempoolacceptrejects it withbad-txns-inputs-duplicate - after that,
listunspentis empty andgetbalancesshowsnonmempool: -1.0until the tx is abandoned
send and walletcreatefundedpsbt aren't affected, because CCoinControl::Select removes duplicates.
This rejects a duplicated input with Invalid parameter, duplicated input: <txid>:<vout> (RPC_INVALID_PARAMETER). The message matches what createrawtransaction says for duplicated addresses. The new sendall_fails_on_duplicate_input test fails on master ("No exception raised") and passes with the fix. wallet_send.py still passes.