bitcoin/bitcoin — pull request #3143 by petertodd (2013-10-24 13:09:52+00:00)
Title: Fix handling of all-txouts-unspendable transactions

Previously DisconnectBlock() would fail when undoing such transactions because it assumed all transactions will add at least one output to the UTXO set.

Be warned that I haven't tested this very well; I may be missing something.