rpc: only sort when combining multiple results

It's only necessary to sort when combining results for several addresses
as the results are already in order from the database.
This commit is contained in:
Braydon Fuller 2016-03-16 14:50:19 -04:00 committed by Braydon Fuller
parent 7959a19085
commit 7dbbb79cec

View File

@ -464,7 +464,9 @@ UniValue getaddresstxids(const UniValue& params, bool fHelp)
}
}
if (addresses.size() > 1) {
std::sort(vtxids.begin(), vtxids.end());
}
UniValue result(UniValue::VARR);
for (std::vector<std::pair<int, std::string> >::const_iterator it=vtxids.begin(); it!=vtxids.end(); it++) {