未验证 提交 86120deb 编写于 作者: D Daniel Larimer 提交者: GitHub

Merge pull request #3046 from EOSIO/issue3026

Fix #3026 - vote_info record is not required for all accounts
......@@ -503,6 +503,7 @@ read_only::get_account_results read_only::get_account( const get_account_params&
const auto& d = db.db();
const auto& rm = db.get_resource_limits_manager();
rm.get_account_limits( result.account_name, result.ram_quota, result.net_weight, result.cpu_weight );
const auto& a = db.get_account(result.account_name);
......@@ -543,7 +544,7 @@ read_only::get_account_results read_only::get_account( const get_account_params&
const auto* t_id = d.find<chain::table_id_object, chain::by_code_scope_table>(boost::make_tuple( config::system_account_name, params.account_name, N(userres) ));
if (t_id != nullptr) {
const auto &idx = d.get_index<key_value_index, by_scope_primary>();
auto it = idx.lower_bound(boost::make_tuple( t_id->id, params.account_name ));
auto it = idx.find(boost::make_tuple( t_id->id, params.account_name ));
if ( it != idx.end() ) {
vector<char> data;
copy_inline_row(*it, data);
......@@ -554,7 +555,7 @@ read_only::get_account_results read_only::get_account( const get_account_params&
t_id = d.find<chain::table_id_object, chain::by_code_scope_table>(boost::make_tuple( config::system_account_name, params.account_name, N(delband) ));
if (t_id != nullptr) {
const auto &idx = d.get_index<key_value_index, by_scope_primary>();
auto it = idx.lower_bound(boost::make_tuple( t_id->id, params.account_name ));
auto it = idx.find(boost::make_tuple( t_id->id, params.account_name ));
if ( it != idx.end() ) {
vector<char> data;
copy_inline_row(*it, data);
......@@ -565,7 +566,7 @@ read_only::get_account_results read_only::get_account( const get_account_params&
t_id = d.find<chain::table_id_object, chain::by_code_scope_table>(boost::make_tuple( config::system_account_name, config::system_account_name, N(voters) ));
if (t_id != nullptr) {
const auto &idx = d.get_index<key_value_index, by_scope_primary>();
auto it = idx.lower_bound(boost::make_tuple( t_id->id, params.account_name ));
auto it = idx.find(boost::make_tuple( t_id->id, params.account_name ));
if ( it != idx.end() ) {
vector<char> data;
copy_inline_row(*it, data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册