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

Method removePrivateKey

programs/light_client/Wallet.cpp:435–445  ·  view source on GitHub ↗

removes only the private key, keeping the public key and label * * @pre isOpen() && !isLocked() **/

Source from the content-addressed store, hash-verified

433 * @pre isOpen() && !isLocked()
434 **/
435bool Wallet::removePrivateKey(QString pubkey)
436{
437 if( !isOpen() ) return false;
438 if( isLocked() ) return false;
439
440 auto pub = fc::variant(pubkey.toStdString()).as<public_key_type>();
441 _data.encrypted_private_keys[pub].encrypted_private_key.resize(0);
442 _available_private_keys.erase(pub);
443
444 return true;
445}
446
447/**
448 * @pre !isLocked()

Callers

nothing calls this directly

Calls 3

variantClass · 0.85
resizeMethod · 0.80
eraseMethod · 0.80

Tested by

no test coverage detected