Is there any danger to create an output that is unspendable? I'm getting a few payments and sometimes people send with too low a fee, my idea is to consolidate and then include the unconfirmed UTXO from those senders.
But of course, I'm a bit worried to create an unspendable output by mistake. The documentation doesn't mention it, so I assume this cannot happen?
Hmm, the command accepts addresses so the only way to create an output that your wallet can't spend is if you've mistyped your address but its checksum is valid.
Or if you've indicated a "
data" output which surely wont happen by accident.
I'm more concerned on the handling of the change since the value has to be precisely calculated, else, all excess amount will be used as fee.
If in doubt, you can use
decoderawtransaction to see the transaction in human-readable json format.
Check the output's address with
getaddressinfo command and if you see those results (
in your test run) and "
iswatchonly": false", then it's good.