Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sapling/sapling_operation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ OperationResult SaplingOperation::loadUtxos(TxValues& txValues)
return errorOut("Insufficient funds, no available UTXO to spend");
}

// sort in ascending order, so smaller utxos appear first
// sort in descending order, so higher utxos appear first
std::sort(transInputs.begin(), transInputs.end(), [](const COutput& i, const COutput& j) -> bool {
return i.Value() < j.Value();
return i.Value() > j.Value();
});

// Final step, append utxo to the transaction
Expand Down