Bring back sorting notes descending by value which was in find_unspent_notes()
This commit is contained in:
@@ -5286,6 +5286,13 @@ UniValue z_sendmany(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
||||
// find all unspent and unlocked notes in this zaddr
|
||||
pwalletMain->GetFilteredNotes(saplingEntries, fromaddress);
|
||||
|
||||
// sort notes from largest to smallest, which means
|
||||
// we will spend the largest first
|
||||
std::sort(saplingEntries.begin(), saplingEntries.end(),
|
||||
[](SaplingNoteEntry i, SaplingNoteEntry j) -> bool {
|
||||
return i.note.value() > j.note.value();
|
||||
});
|
||||
|
||||
CAmount total_value = 0;
|
||||
|
||||
std::vector<SendManyInputSaplingNote> saplingNoteInputs;
|
||||
|
||||
Reference in New Issue
Block a user