A function that modifies a transaction to handle the change after paying the fee.
The transaction to modify.
The excess capacity available for the change.
The additional capacity needed if the excess capacity is insufficient, or 0 if the fee is paid.
A function that modifies a transaction to handle the change after paying the fee.