Code formatting

This commit is contained in:
serkixenos 2023-12-14 14:31:08 +01:00
parent cada740d73
commit 2af98fc0fc
2 changed files with 8 additions and 7 deletions

View file

@ -366,9 +366,10 @@ vector<operation_history_object> history_api::get_account_history(const std::str
_app.elasticsearch_thread = std::make_shared<fc::thread>("elasticsearch"); _app.elasticsearch_thread = std::make_shared<fc::thread>("elasticsearch");
return _app.elasticsearch_thread->async([&es, &account, &stop, &limit, &start]() { return _app.elasticsearch_thread->async([&es, &account, &stop, &limit, &start]() {
return es->get_account_history(account, stop, limit, start); return es->get_account_history(account, stop, limit, start);
}, },
"thread invoke for method " BOOST_PP_STRINGIZE(method_name)).wait(); "thread invoke for method " BOOST_PP_STRINGIZE(method_name))
.wait();
} }
} }

View file

@ -2197,7 +2197,7 @@ vector<variant> database_api_impl::lookup_vote_ids(const vector<vote_id_type> &v
case vote_id_type::committee: { case vote_id_type::committee: {
auto itr = committee_idx.find(id); auto itr = committee_idx.find(id);
if (itr != committee_idx.end()) if (itr != committee_idx.end())
result.emplace_back( variant( *itr, 2 ) ); // Depth of committee_member_object is 1, add 1 to be safe result.emplace_back(variant(*itr, 2)); // Depth of committee_member_object is 1, add 1 to be safe
else else
result.emplace_back(variant()); result.emplace_back(variant());
break; break;
@ -2205,7 +2205,7 @@ vector<variant> database_api_impl::lookup_vote_ids(const vector<vote_id_type> &v
case vote_id_type::witness: { case vote_id_type::witness: {
auto itr = witness_idx.find(id); auto itr = witness_idx.find(id);
if (itr != witness_idx.end()) if (itr != witness_idx.end())
result.emplace_back( variant( *itr, 2 ) ); // Depth of witness_object is 1, add 1 here to be safe result.emplace_back(variant(*itr, 2)); // Depth of witness_object is 1, add 1 here to be safe
else else
result.emplace_back(variant()); result.emplace_back(variant());
break; break;
@ -2213,13 +2213,13 @@ vector<variant> database_api_impl::lookup_vote_ids(const vector<vote_id_type> &v
case vote_id_type::worker: { case vote_id_type::worker: {
auto itr = for_worker_idx.find(id); auto itr = for_worker_idx.find(id);
if (itr != for_worker_idx.end()) { if (itr != for_worker_idx.end()) {
result.emplace_back( variant( *itr, 4 ) ); // Depth of worker_object is 3, add 1 here to be safe. result.emplace_back(variant(*itr, 4)); // Depth of worker_object is 3, add 1 here to be safe.
// If we want to extract the balance object inside, // If we want to extract the balance object inside,
// need to increase this value // need to increase this value
} else { } else {
auto itr = against_worker_idx.find(id); auto itr = against_worker_idx.find(id);
if (itr != against_worker_idx.end()) { if (itr != against_worker_idx.end()) {
result.emplace_back( variant( *itr, 4 ) ); // Depth of worker_object is 3, add 1 here to be safe. result.emplace_back(variant(*itr, 4)); // Depth of worker_object is 3, add 1 here to be safe.
// If we want to extract the balance object inside, // If we want to extract the balance object inside,
// need to increase this value // need to increase this value
} else { } else {