MCPcopy Create free account
hub / github.com/cryptonomex/graphene / removePublicKey

Method removePublicKey

programs/light_client/Wallet.cpp:415–429  ·  view source on GitHub ↗

removes the key, its lablel and its private key */

Source from the content-addressed store, hash-verified

413
414/** removes the key, its lablel and its private key */
415bool Wallet::removePublicKey(QString pubkey)
416{
417 if( !isOpen() ) return false;
418 auto pub = fc::variant( pubkey.toStdString() ).as<public_key_type>();
419 _available_private_keys.erase(pub);
420
421 auto itr = _data.encrypted_private_keys.find(pub);
422 if( itr != _data.encrypted_private_keys.end() )
423 {
424 _label_to_key.erase(QString::fromStdString(itr->second.label));
425 _data.encrypted_private_keys.erase(itr);
426 return true;
427 }
428 return false;
429}
430
431/** removes only the private key, keeping the public key and label
432 *

Callers

nothing calls this directly

Calls 4

variantClass · 0.85
eraseMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected