this pull request has been waiting for some time, so maybe i should start a forum thread about it:https://github.com/bitcoin/bitcoin/pull/123The problem
Bitcoin currently only works for many things "per transaction", transactions as a whole are spent or not, and as a whole give a certain amount of available credits. However, when multiple outputs of a single transaction are available, it is sometimes useful to not use all of them. See http://bitcointalk.org/index.php?topic=3759.0
The problem with this is that bitcoin's wallet database only keeps a single boolean per transaction to indicate "spentness".The patch
This patch adds an (optional) array of booleans per tx to the wallet format, while keeping the old single boolean updated according to "at least one output spent". Calculation of available coins is updated to only count the specifically available ones, and selection of coins for new transactions is done per-txout instead of per-tx (fixing the linked issue).Backward compatibility
When you load an updated wallet (with partially-spent transactions) into an old client, it will show you a lower balance than the actual one, since it cannot cope with the available partial outputs. The transaction list is accurate though, and switching back to the new client fixes the issue.