mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-25 07:55:21 -04:00
[refactor] use lambda.
This commit is contained in:
parent
088334014c
commit
c899466ec4
1 changed files with 18 additions and 21 deletions
|
@ -49,9 +49,7 @@ class AddressBasedCoinSelector implements CoinSelector {
|
|||
|
||||
@VisibleForTesting
|
||||
static void sortOutputs(ArrayList<TransactionOutput> outputs) {
|
||||
Collections.sort(outputs, new Comparator<TransactionOutput>() {
|
||||
@Override
|
||||
public int compare(TransactionOutput a, TransactionOutput b) {
|
||||
Collections.sort(outputs, (a, b) -> {
|
||||
int depth1 = a.getParentTransactionDepthInBlocks();
|
||||
int depth2 = b.getParentTransactionDepthInBlocks();
|
||||
Coin aValue = a.getValue();
|
||||
|
@ -69,7 +67,6 @@ class AddressBasedCoinSelector implements CoinSelector {
|
|||
BigInteger aHash = a.getParentTransactionHash().toBigInteger();
|
||||
BigInteger bHash = b.getParentTransactionHash().toBigInteger();
|
||||
return aHash.compareTo(bHash);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue