Skip to content

Commit

Permalink
Use count instead of find
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamc1 committed Feb 16, 2023
1 parent 1d9d925 commit 111f664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masternodes/rpc_accounts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ UniValue gettokenbalances(const JSONRPCRequest& request) {

mnview.ForEachBalance([&](CScript const & owner, CTokenAmount balance) {
if (IsMineCached(*pwallet, owner)) {
if (calculatedOwners.find(owner) == calculatedOwners.end()) {
if (calculatedOwners.count(owner) == 0) {
mnview.CalculateOwnerRewards(owner, targetHeight);
calculatedOwners.emplace(owner);
}
Expand Down

0 comments on commit 111f664

Please sign in to comment.