Skip to content
This repository has been archived by the owner on Feb 21, 2019. It is now read-only.

Commit

Permalink
Allow regenerating keys for inconsistent account records
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramrajkumar committed Dec 10, 2014
1 parent 33a77bd commit bc6fcd2
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions libraries/wallet/wallet.cpp
Expand Up @@ -1316,14 +1316,6 @@ namespace detail {
my->_wallet_db.rename_account( *old_key, new_account_name );
} FC_CAPTURE_AND_RETHROW( (old_account_name)(new_account_name) ) }

/**
* If we already have a key record for key, then set the private key.
* If we do not have a key record,
* If account_name is a valid existing account, then create key record
* with that account as parent.
* If account_name is not set, then lookup account with key in the blockchain
* add contact account using data from blockchain and then set the private key
*/
public_key_type wallet::import_private_key( const private_key_type& new_private_key,
const optional<string>& account_name,
bool create_account )
Expand Down Expand Up @@ -2155,7 +2147,7 @@ namespace detail {
FC_ASSERT( num_keys_to_regenerate > 0 );

owallet_account_record account_record = my->_wallet_db.lookup_account( account_name );
FC_ASSERT( account_record.valid() && account_record->is_my_account );
FC_ASSERT( account_record.valid() );

// Update local account records with latest global state
my->scan_registered_accounts();
Expand Down

0 comments on commit bc6fcd2

Please sign in to comment.