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 bare addresses so the only way to create an non-spendable output is if you've mistyped an address with a valid checksum.
Or if you've indicated a "
data" output which surely wont happen on 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 before you broadcast it.