I'm confused about how exactly should I compute a change for a transactions.
Say, for a given address I have 4 unspent outputs containing 2 BTC each and I want to send 5 BTC to other address.
Here's what I do:
- Find 3 outputs needed so the total is 6 BTC
- Now, what should be the change? 6-5=1 or 8-5=3?