@@ -110,7 +110,7 @@ std::map<uint32_t, int64_t> global_balance_money;
110110// ! Reserved balances of wallet propertiess
111111std::map<uint32_t , int64_t > global_balance_reserved;
112112// ! Vector containing a list of properties relative to the wallet
113- std::vector <uint32_t > global_wallet_property_list;
113+ std::set <uint32_t > global_wallet_property_list;
114114
115115/* *
116116 * Used to indicate, whether to automatically commit created transactions.
@@ -620,10 +620,8 @@ void mastercore::set_wallet_totals()
620620 my_it->second .init ();
621621 uint32_t propertyId;
622622 while (0 != (propertyId = (my_it->second ).next ())) {
623- // add to the global wallet property list (avoiding duplicates)
624- if (std::find (global_wallet_property_list.begin (), global_wallet_property_list.end (), propertyId) == global_wallet_property_list.end ()) {
625- global_wallet_property_list.push_back (propertyId);
626- }
623+ // add to the global wallet property list
624+ global_wallet_property_list.insert (propertyId);
627625
628626 // check if the address is spendable (only spendable balances are included in totals)
629627 if (addressIsMine != ISMINE_SPENDABLE) continue ;
@@ -635,9 +633,6 @@ void mastercore::set_wallet_totals()
635633 global_balance_reserved[propertyId] += getMPbalance (address, propertyId, ACCEPT_RESERVE);
636634 }
637635 }
638-
639- // sort the global wallet property list
640- std::sort (global_wallet_property_list.begin (), global_wallet_property_list.end ());
641636}
642637
643638int TXExodusFundraiser (const CTransaction &wtx, const string &sender, int64_t ExodusHighestValue, int nBlock, unsigned int nTime)
0 commit comments