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:
parent
7959a19085
commit
7dbbb79cec
@ -464,7 +464,9 @@ UniValue getaddresstxids(const UniValue& params, bool fHelp)
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(vtxids.begin(), vtxids.end());
|
||||
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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user