| 219 | return true; |
| 220 | } |
| 221 | bool Wallet::hasPrivateKey(QString pubkey, bool include_with_brain_key) |
| 222 | { |
| 223 | auto pub = fc::variant(pubkey.toStdString()).as<public_key_type>(); |
| 224 | auto itr = _data.encrypted_private_keys.find(pub); |
| 225 | if( itr == _data.encrypted_private_keys.end() ) |
| 226 | return false; |
| 227 | if( itr->second.encrypted_private_key.size() ) |
| 228 | return true; |
| 229 | if( include_with_brain_key && itr->second.brain_sequence >= 0 ) |
| 230 | { |
| 231 | if( !itr->second.owner ) |
| 232 | return true; |
| 233 | return hasPrivateKey(toQString(*itr->second.owner), include_with_brain_key); |
| 234 | } |
| 235 | return false; |
| 236 | } |
| 237 | |
| 238 | QString Wallet::getPrivateKey(QString pubkey) |
| 239 | { |
no test coverage detected