Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade account bug fixed #99

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions libraries/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,6 @@ class wallet_api_impl
}
account_object get_account(account_id_type id) const
{
if( _wallet.my_accounts.get<by_id>().count(id) )
return *_wallet.my_accounts.get<by_id>().find(id);
auto rec = _remote_db->get_accounts({id}).front();
FC_ASSERT(rec);
return *rec;
Expand All @@ -733,19 +731,6 @@ class wallet_api_impl
// It's an ID
return get_account(*id);
} else {
// It's a name
if( _wallet.my_accounts.get<by_name>().count(account_name_or_id) )
{
auto local_account = *_wallet.my_accounts.get<by_name>().find(account_name_or_id);
auto blockchain_account = _remote_db->lookup_account_names({account_name_or_id}).front();
FC_ASSERT( blockchain_account );
if (local_account.id != blockchain_account->id)
elog("my account id ${id} different from blockchain id ${id2}", ("id", local_account.id)("id2", blockchain_account->id));
if (local_account.name != blockchain_account->name)
elog("my account name ${id} different from blockchain name ${id2}", ("id", local_account.name)("id2", blockchain_account->name));

return *_wallet.my_accounts.get<by_name>().find(account_name_or_id);
}
auto rec = _remote_db->lookup_account_names({account_name_or_id}).front();
FC_ASSERT( rec && rec->name == account_name_or_id );
return *rec;
Expand Down