bitcoinj/bitcoinj — pull request #287 by RevCBH (2014-11-29 08:10:19+00:00)
Title: Prevent negative fees w/ DefaultCoinSelector

In 0.12.2 it's possible to try and create a transaction with negative fees if some of the selected outputs share a parent transaction and have identical values and destinations.

DefaultCoinSelector#select was accumulating outputs in a HashSet and the definition of TransactionOutput#equals doesn't account for outputs that are only differentiated by index in a parent transaction. This is a minimal fix to correct the behavior of DefaultCoinSelector by using an ArrayList instead of a HashSet.

Should TransactionOutput equality be modified?