use assert instead of checking condition with low possibility
This commit is contained in:
parent
62f973ca80
commit
dbf6be02c5
1 changed files with 2 additions and 4 deletions
|
|
@ -1940,8 +1940,7 @@ public:
|
|||
owners.resize(son_objects.size());
|
||||
std::transform(son_objects.begin(), son_objects.end(), owners.begin(),
|
||||
[](const fc::optional<son_object>& obj) {
|
||||
if(!obj)
|
||||
FC_THROW("Invalid active SONs list in global properties.");
|
||||
FC_ASSERT(obj, "Invalid active SONs list in global properties.");
|
||||
return obj->son_account;
|
||||
});
|
||||
vector<fc::optional<account_object>> accs = _remote_db->get_accounts(owners);
|
||||
|
|
@ -1949,8 +1948,7 @@ public:
|
|||
std::transform(accs.begin(), accs.end(), gpo.active_sons.begin(),
|
||||
std::inserter(result, result.end()),
|
||||
[](fc::optional<account_object>& acct, son_id_type& sid) {
|
||||
if(!acct)
|
||||
FC_THROW("Invalid active SONs list in global properties.");
|
||||
FC_ASSERT(acct, "Invalid active SONs list in global properties.");
|
||||
return std::make_pair<string, son_id_type>(string(acct->name), std::move(sid));
|
||||
});
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Reference in a new issue